Skip to content

test(concurrency): Order the calc-reader test's runs with events instead of sleep durations - #2562

Merged
schloerke merged 1 commit into
schloerke/2508-stack-review-fixesfrom
schloerke/2552-calc-reader-test
Oct 15, 2026
Merged

schloerke merged 1 commit into
schloerke/2508-stack-review-fixesfrom
schloerke/2552-calc-reader-test

Conversation

@schloerke

Copy link
Copy Markdown
Collaborator

Follow-up to #2552.

test_async_calc_reader_waits_for_the_latest_run ordered its three calc runs with asyncio.sleep(0.05) / 0.15 / 0.01 delays, so on a slow CI machine the "stale run finishes first" interleaving it exists to check was not guaranteed. The runs are now gated by asyncio.Events: run A is released first while run B is still in progress with a waiting reader, which pins the interleaving deterministically. The test also waits for the round that v.set(2) requested before returning.

A review had attributed a Task was destroyed but it is pending! line to this test; it did not reproduce in isolated runs, so that is not what this change addresses.

@schloerke
schloerke merged commit 9530e37 into schloerke/2508-stack-review-fixes Oct 15, 2026
174 checks passed
@schloerke
schloerke deleted the schloerke/2552-calc-reader-test branch October 15, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant