test(integration): stabilize watch helper using run-completion sync#5879
test(integration): stabilize watch helper using run-completion sync#5879mostafaNazari702 wants to merge 1 commit into
Conversation
|
Wrong branch. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5879 +/- ##
==========================================
+ Coverage 80.89% 81.00% +0.10%
==========================================
Files 64 64
Lines 4602 4602
Branches 976 976
==========================================
+ Hits 3723 3728 +5
+ Misses 879 874 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I was actually right, thought that i pushed code to the previous active PR that i have. Sorry. |
8bb403d to
f755981
Compare
|
Nice, this could finally close that issue :) updated the branch to get another run to see if there is flakiness left, thank you :) |
|
@mostafaNazari702 the most recent CI run has integration failures |
62ee929 to
54dcfda
Compare
|
Accidental push without committing closed the PR, excuse me. |
23e44f8 to
904bd70
Compare
904bd70 to
716b6ec
Compare
PR Checklist
status: accepting prsOverview
Replace fixed-sleep timing in runMochaWatchAsync with stdout synchronisation to remove flaky watch integration tests.
old approach relied on sleeps around the "change" callback which could race with incomplete runs on CI causing inconsistent test results.
we buffer instead stdout to reliably detect "stats" run-completion markers across chunk boundaries and replace the multi-waiter loop with a single progress waite, and snapshots the run baseline before triggering "change" to prevent race conditions.
an expectedRuns option is added to avoid unnecessary rerun waits in negative tests and tests are updated to use it where appropriate.
Now we have faster and more stable watch tests (from 120 seconds down to, from my test, 51) with all integration tests still passing.
EDIT: