chenBright opened a new pull request, #3545:
URL: https://github.com/apache/brpc/pull/3545

   ### What problem does this PR solve?
   
   Issue Number: resolve 
   
   Problem Summary:
   
   Running unit tests in parallel exposes timing assumptions that can cause 
intermittent failures:
   - Fixed sleeps do not guarantee that workers have entered the expected 
waiting state.
   - Tight elapsed-time assertions fail under normal scheduling delays.
   - An increased connection count does not guarantee that an accepted socket 
has been published to the connection list.
   - Some shutdown paths can lose wakeups or leave worker threads unjoined.
   - An interruption between pthread butex waiter registration and the 
underlying wait can return an incorrect error code.
   - Multi-tag tests compare prefilled zero values instead of validating the 
actual tags.
   
   ### What is changed and the side effects?
   
   Changed:
   
   - Replace fixed sleeps with explicit synchronization, state observation, and 
completion acknowledgements.
   - Check timeout, interruption, wakeup, and completion semantics instead of 
narrow scheduling-time windows.
   - Retain timeout guards and checks that waits do not complete prematurely.
   - Fix the pthread butex interruption race while preserving genuine 
value-mismatch and timeout errors.
   - Wait for accepted sockets to appear in the connection list before checking 
their buffer settings.
   - Improve stop-flag synchronization, thread cleanup, and state reset for 
repeated test execution.
   - Correct the result containers and assertions in multi-tag tests.
   - Replace public-network connection dependencies with local TCP listeners 
and add a Linux-specific connection timeout case.
   
   Side effects:
   - Performance effects:
   
   - Breaking backward compatibility: 
   
   ---
   ### Check List:
   - Please make sure your changes are compilable.
   - When providing us with a new feature, it is best to add related tests.
   - Please follow [Contributor Covenant Code of 
Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to