-
Notifications
You must be signed in to change notification settings - Fork 30k
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: fix test-watch-mode-inspect #45586
test: fix test-watch-mode-inspect #45586
Conversation
Hi, is there something I can do to help move this forward? I've seen Test ASan failing, but it seems unrelated to my changes. |
Test ASan is failing because your branch doesn't have 3b1f389. If you rebase against the main branch and force push, that should fix it. (I tried to rebase and force push to your branch, but I don't have sufficient privileges to do that.) |
b8a699e
to
60372b9
Compare
Thanks, @Trott! Rebasing helped with Test ASan, but unfortunately, Also, I have another PR similar to this one (#45585), since it had the same issue as this one and I force-pushed it as well, I guess you'd want to add a |
Commit Queue failed- Loading data for nodejs/node/pull/45586 ✔ Done loading data for nodejs/node/pull/45586 ----------------------------------- PR info ------------------------------------ Title test: fix test-watch-mode-inspect (#45586) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch StefanStojanovic:mefi-watch-mode-inspect-test -> nodejs:main Labels test, needs-ci, watch-mode Commits 1 - test: fix test-watch-mode-inspect Committers 1 - StefanStojanovic PR-URL: https://github.com/nodejs/node/pull/45586 Refs: https://github.com/nodejs/node/issues/44898 Reviewed-By: Moshe Atlow Reviewed-By: Erick Wendel ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/45586 Refs: https://github.com/nodejs/node/issues/44898 Reviewed-By: Moshe Atlow Reviewed-By: Erick Wendel -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - test: fix test-watch-mode-inspect ℹ This PR was created on Tue, 22 Nov 2022 17:10:57 GMT ✔ Approvals: 2 ✔ - Moshe Atlow (@MoLow): https://github.com/nodejs/node/pull/45586#pullrequestreview-1191665656 ✔ - Erick Wendel (@erickwendel): https://github.com/nodejs/node/pull/45586#pullrequestreview-1191845641 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2022-12-01T16:56:08Z: https://ci.nodejs.org/job/node-test-pull-request/48266/ - Querying data for job/node-test-pull-request/48266/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/3595374544 |
Landed in 2cad517 |
Refs: #44898 PR-URL: #45586 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Erick Wendel <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Refs: #44898 PR-URL: #45586 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Erick Wendel <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Refs: #44898 PR-URL: #45586 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Erick Wendel <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Refs: #44898 PR-URL: #45586 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Erick Wendel <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Refs: #44898 PR-URL: #45586 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Erick Wendel <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Refs: #44898 PR-URL: #45586 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Erick Wendel <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This PR fixes flakiness in watch mode tests in
test/sequential/test-watch-mode-inspect.mjs
. The changes made introduce a basic synchronization between restarting the process (rewriting the file) and its execution. Previously, it was possible to restart the process while it was still executing (while getting debugged PID) which caused the test to fail, and in some cases even leave it hanging.With these changes, one problem still persists. Rarely, in less than 1% of runs, logs from the start of the process, until the first restart are missing. Eg. instead of getting (inspector helper debug logs included)
test gets
It is worth noting that although
safe to debug now
is sometimes not caught viaNodeInstance.on('stdout', (data) => { stdout.push(data); });
it is always caught viaInspectorSession.waitForConsoleOutput('log', 'safe to debug now');
This behavior seems to be random, and by the looks of it, it's related to watch mode in a more general way, not directly related to these tests. It should probably be addressed in a separate issue and PR.
Refs: #44898