Skip to content

Fix flaky TestTerminatesAfter by replacing Thread.Sleep with SpinWait#600

Merged
Iliya-usov merged 1 commit intomasterfrom
usov/fix-test
Mar 19, 2026
Merged

Fix flaky TestTerminatesAfter by replacing Thread.Sleep with SpinWait#600
Iliya-usov merged 1 commit intomasterfrom
usov/fix-test

Conversation

@Iliya-usov
Copy link
Collaborator

Replace fixed-sleep + assert pattern with SpinWait.SpinUntil so the test succeeds as soon as the condition becomes true rather than relying on a 200ms window that can be exceeded on loaded machines or CI.

Replace fixed-sleep + assert pattern with SpinWait.SpinUntil so the test
succeeds as soon as the condition becomes true rather than relying on a
200ms window that can be exceeded on loaded machines or CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ForNeVeR ForNeVeR assigned Iliya-usov and unassigned ForNeVeR Mar 18, 2026
@Iliya-usov Iliya-usov merged commit 881d301 into master Mar 19, 2026
9 checks passed
@Iliya-usov Iliya-usov deleted the usov/fix-test branch March 19, 2026 16:31
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.

2 participants