Anurag-S1ngh opened a new pull request, #41342: URL: https://github.com/apache/beam/pull/41342
## Summary `StateCacheTest.test_concurrent_get_waits` flaked with: ``` AssertionError: 1675794730365251754 not less than or equal to 1675794730365097126 ``` The test starts two loader threads that block on a barrier, has the main thread wait at the same barrier, and then records `current_time_ns` to assert that both loads finished after that point. Once the barrier releases, either loader thread can run to completion, including releasing the semaphore and recording its own time, before the main thread is scheduled again. When that happens, the loader's recorded time is earlier than `current_time_ns` and the assertion fails even though the behavior under test is correct. Record `current_time_ns` before the main thread joins the barrier. The barrier only releases when the main thread arrives, so the timestamp is then guaranteed to precede any work the loader threads do after the barrier, while the rest of the test is unchanged. Addresses #25433 ## Testing - `pytest sdks/python/apache_beam/runners/worker/statecache_test.py` (16 passed) - `test_concurrent_get_waits` run 40 additional times in isolation (all passed) -- 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]
