Skip to content

test: Fix flaky event manager tests by replacing sleep with wait#1830

Merged
vdusek merged 1 commit intomasterfrom
fix/flaky-event-manager-tests
Apr 2, 2026
Merged

test: Fix flaky event manager tests by replacing sleep with wait#1830
vdusek merged 1 commit intomasterfrom
fix/flaky-event-manager-tests

Conversation

@vdusek
Copy link
Copy Markdown
Collaborator

@vdusek vdusek commented Apr 2, 2026

Summary

  • Replace asyncio.sleep(0.1) with event_manager.wait_for_all_listeners_to_complete() in 5 event manager tests
  • The sleep-based approach was a race condition — under CI load (parallel xdist workers), 100ms wasn't always enough for asyncio.to_thread() to complete sync listeners

🤖 Generated with Claude Code

…stic wait

Replace `asyncio.sleep(0.1)` with `event_manager.wait_for_all_listeners_to_complete()`
in event manager tests. The sleep-based approach was a race condition — under CI load,
100ms wasn't always enough for `asyncio.to_thread()` to complete.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels Apr 2, 2026
@vdusek vdusek self-assigned this Apr 2, 2026
@github-actions github-actions bot added this to the 137th sprint - Tooling team milestone Apr 2, 2026
@github-actions github-actions bot added the tested Temporary label used only programatically for some analytics. label Apr 2, 2026
@vdusek vdusek changed the title test: Fix flaky event manager tests by replacing sleep with deterministic wait test: Fix flaky event manager tests by replacing sleep with wait Apr 2, 2026
@vdusek vdusek requested a review from Pijukatel April 2, 2026 06:59
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.27%. Comparing base (2efb668) to head (d5404dc).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1830      +/-   ##
==========================================
- Coverage   92.29%   92.27%   -0.02%     
==========================================
  Files         157      157              
  Lines       10900    10900              
==========================================
- Hits        10060    10058       -2     
- Misses        840      842       +2     
Flag Coverage Δ
unit 92.27% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek merged commit 2c691d0 into master Apr 2, 2026
32 checks passed
@vdusek vdusek deleted the fix/flaky-event-manager-tests branch April 2, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants