kpumuk opened a new pull request, #3368:
URL: https://github.com/apache/thrift/pull/3368

   <!-- Explain the changes in the pull request below: -->
     
   Repeated Ruby suite runs exposed nondeterministic failures in the 
nonblocking server specs. The failures were caused by incomplete teardown of 
the Ruby nonblocking server path, which left resources alive across runs and 
made test ordering matter.
   
   - Use ephemeral ports in the specs instead of a fixed port, as the hardcoded 
port made repeated runs race rebinding and produced `EADDRINUSE`-style failures 
unrelated to the behavior under test.
   - Wait for the server to be listening before creating clients, because 
starting the server thread was not enough to guarantee the accept side was 
ready, so client setup could race server startup.
   - Change the spec teardown from raw `Thread#kill` to `shutdown` plus `join`, 
with `kill` only as a fallback - raw kill made teardown timing-dependent and 
left cleanup incomplete under repeated suite runs.
   - Same in `IOManager#ensure_closed`, `kill` and then `join` the I/O thread 
before forced cleanup. `Thread#kill` is asynchronous; joining makes forced 
cleanup synchronous so teardown does not race a still-unwinding I/O thread.
   - ^ This allows us to close tracked connections during forced cleanup in 
`ensure_closed`. Addresses the situation when the server is torn down abruptly, 
and sockets remain open and accumulate across runs.
   
   <!-- We recommend you review the checklist/tips before submitting a pull 
request. -->
   
   - [ ] Did you create an [Apache 
Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket?  
([Request account here](https://selfserve.apache.org/jira-account.html), not 
required for trivial changes)
   - [ ] If a ticket exists: Does your pull request title follow the pattern 
"THRIFT-NNNN: describe my issue"?
   - [x] Did you squash your changes to a single commit?  (not required, but 
preferred)
   - [x] Did you do your best to avoid breaking changes?  If one was needed, 
did you label the Jira ticket with "Breaking-Change"?
   - [ ] If your change does not involve any code, include `[skip ci]` anywhere 
in the commit message to free up build resources.
   
   <!--
     The Contributing Guide at:
     https://github.com/apache/thrift/blob/master/CONTRIBUTING.md
     has more details and tips for committing properly.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to