Fix flaky test tests/test_background_on_async_pool.py::test_lease_drains_fan_out_plans_every_node_off_the_loop_on_the_async_pool
The merge lane saw `tests/test_background_on_async_pool.py::test_lease_drains_fan_out_plans_every_node_off_the_loop_on_the_async_pool` fail and then pass on a rerun of the same tree.
- Test: `tests/test_background_on_async_pool.py::test_lease_drains_fan_out_plans_every_node_off_the_loop_on_the_async_pool`
- Tree: `e5321c7e607828276c2411c153b443d837a6cabd`
- Lane task: 13177
- Flake record: 01a1a0de-58bf-7a89-881a-0dfd9ec22172
Make it deterministic; do not delete it unless it tests nothing.
Outcome
Fixed the flake at its root: a race in db_async.sync_bind() lazily building the bridge. Added a double-checked lock and a test that forces the race (it fails on old code). Quick gate green, file 5/5 green, both review lanes passed. PR #7837 queued to the lane; deploy not yet watched (it follows the lane's merge). Memory: none applied.
Artifacts
Activity
- Ready
- Runner started
- Runner ended (done)