-
-
Couldn't load subscription status.
- Fork 33.6k
test: fix flaky test-watch-mode-kill-signal-* #60443
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
base: main
Are you sure you want to change the base?
Conversation
After the write triggers a restart of the grandchild, the newly spawned second grandchild can post another 'script ready' message before the stdout from the first grandchild is relayed by the watcher and processed by this parent process to kill the watcher. If we write again and trigger another restart, we can end up in an infinite loop and never receive the stdout of the grandchildren in time. Only write once to verify the first grandchild process receives the expected signal. We don't care about the subsequent grandchild processes.
03eecd9 to
5e0933e
Compare
|
Stress test on main branch: https://ci.nodejs.org/job/node-stress-single-test/620/ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60443 +/- ##
==========================================
+ Coverage 88.07% 88.58% +0.50%
==========================================
Files 704 704
Lines 207778 207826 +48
Branches 39949 40055 +106
==========================================
+ Hits 182998 184099 +1101
+ Misses 16791 15790 -1001
+ Partials 7989 7937 -52 🚀 New features to boost your workflow:
|
The stress test failed in this PR, though the message seems helpful. It does prove my hypothesis about the |
|
Stress test came back clean: https://ci.nodejs.org/job/node-stress-single-test/622/ |
e40cc9e to
4d88f9d
Compare
After the write triggers a restart of the grandchild, the newly spawned second grandchild can post another 'script ready' message before the stdout from the first grandchild is relayed by the watcher and processed by this parent process to kill the watcher. If we write again and trigger another restart, we can end up in an infinite loop and never receive the stdout of the grandchildren in time.
Only write once to verify the first grandchild process receives the expected signal. We don't care about the subsequent grandchild processes.
Drive-by: add some logs to aid debugging in case they fail again in the CI.
Refs: #60297
Refs: #60391