-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
test: split test-runner-run-watch.mjs #60653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: split test-runner-run-watch.mjs #60653
Conversation
This test contains too many independent test cases and as a result, marking it as flaky on all major platforms means actual regressions could be covered up, and it's constantly making the CI orange and requires extra resuming on the flaked platforms which is still not great. Split it into individual files so that the actual flake can be identified out of the monolith.
|
Review requested:
|
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60653 +/- ##
==========================================
- Coverage 88.54% 88.45% -0.09%
==========================================
Files 704 703 -1
Lines 208103 208058 -45
Branches 40089 40001 -88
==========================================
- Hits 184256 184031 -225
- Misses 15876 16029 +153
- Partials 7971 7998 +27 🚀 New features to boost your workflow:
|
| common.platformTimeout(1000), | ||
| ); | ||
| await ran2.promise; | ||
| clearInterval(interval); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied the original logic in
node/test/parallel/test-runner-run-watch.mjs
Lines 80 to 83 in 9524908
| const interval = setInterval(() => writeFileSync(path, content), common.platformTimeout(1000)); | |
| await ran2.promise; | |
| runs.push(currentRun); | |
| clearInterval(interval); |
performFileOperation() helper; test-run-watch-dependency-repeatedly.mjs flaked in https://ci.nodejs.org/job/node-test-pull-request/70115/ and I think the culprit might be in this logic - the interval fires too fast and before the test finishes, the write fires, then the watched process get killed with SIGTERM to run again. I think the follow up to deflake it might be to just do what's in the branch below and not do the interval.
(I am somewhat puzzled why it's using an interval in the original logic, I think update + timeout like the branch below which was split from the --watch test should suffice; repeated updates could trigger additional events that kill the process being watched unexpectedly @mcollina )
|
Landed in ea1a240 |
This test contains too many independent test cases and as a result, marking it as flaky on all major platforms means actual regressions could be covered up, and it's constantly making the CI orange and requires extra resuming on the flaked platforms which is still not great. Split it into individual files so that the actual flake can be identified out of the monolith. PR-URL: #60653 Refs: #54534 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This test contains too many independent test cases and as a result, marking it as flaky on all major platforms means actual regressions could be covered up, and it's constantly making the CI orange and requires extra resuming on the flaked platforms which is still not great. Also, it can increase the flakiness when the tests share the same files being watched due to file system events coalescing. Split it into individual files so that the actual flake can be identified out of the monolith and reduce flakiness.
Refs: #54534