Skip to content

Fix flaky Throttle tests (poll instead of fixed sleeps)#10

Merged
gaelsimon merged 1 commit into
mainfrom
fix/throttle-test-flake
Jun 19, 2026
Merged

Fix flaky Throttle tests (poll instead of fixed sleeps)#10
gaelsimon merged 1 commit into
mainfrom
fix/throttle-test-flake

Conversation

@gaelsimon

Copy link
Copy Markdown
Owner

ThrottleTests asserted after a fixed sleep, which raced under CI load — actionErrorCallsOnError intermittently saw 0 errors before onError fired (it blocked merging #8).

Replaces fixed-sleep-then-assert with waitUntil { … } polling (5s timeout) for the positive-assertion tests, so each waits exactly as long as needed and a real regression still fails after the timeout. Negative assertions (cancel prevents execution) keep a short sleep. Runs ~0.26s, passed 5/5 locally.

@sonarqubecloud

Copy link
Copy Markdown

@gaelsimon gaelsimon merged commit 8bea986 into main Jun 19, 2026
3 checks passed
@gaelsimon gaelsimon deleted the fix/throttle-test-flake branch June 19, 2026 15:45
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