Skip to content

Synchronize the last-window upstream cancellation test - #61

Merged
kommander merged 1 commit into
devfrom
fix/last-window-test
Nov 14, 2026
Merged

kommander merged 1 commit into
devfrom
fix/last-window-test

Conversation

@kommander

Copy link
Copy Markdown
Contributor

Both Nov 12 and Nov 14 failed at line 164: after cancelling the first window, the test expected one upstream but found zero. Waiting for one upstream to open only proves one window registered. If the second collector has not run yet, cancelling the first correctly closes the upstream.

Run this test on the coroutine test scheduler. Drain pending work before the first cancellation and after each cancellation, then check the upstream count and termination state directly. No production changes or longer timeouts.

Verification: Reproduced the same assertion locally with concurrent test instances and a temporary 50 ms delay before the second collector subscribed. The fixed test passed 25 forced Gradle runs; :server:testDebugUnitTest and scripts/check.sh :server both passed.

An open upstream proves only one collector registered. Drain the test dispatcher before cancelling either window and after each cancellation instead of polling wall time. Verified with 25 focused runs, :server:testDebugUnitTest and scripts/check.sh :server.
@kommander
kommander merged commit 65aff09 into dev Nov 14, 2026
3 checks passed
@kommander
kommander deleted the fix/last-window-test branch November 14, 2026 00:37
@Tarquinen Tarquinen mentioned this pull request Nov 14, 2026

This branch was previously deployed

1 inactive deployment
release — ed875d0d Deployed Nov 14, 2026 by kommander via check #187
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