Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test] Remove problematic thread from MainLoopTest to fix flakiness
This test, specifically `TwoSignalCallbacks`, can be a little bit flaky, failing in around 5/2000 runs. POSIX says: > If the value of pid causes sig to be generated for the sending process, and if sig is not blocked for the calling thread and if no other thread has sig unblocked or is waiting in a sigwait() function for sig, either sig or at least one pending unblocked signal shall be delivered to the sending thread before kill() returns. The problem is that in test setup, we create a new thread with `std::async` and that is occasionally not cleaned up. This leaves that thread available to eat the signal we're polling for. The need for this to be async does not apply anymore, so we can just make it synchronous. This makes the test passes in 10000 runs. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D133181
- Loading branch information