test: fix test-watch-mode#45585
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Dec 1, 2022
Merged
Conversation
41440ce to
a81c9cc
Compare
MoLow
approved these changes
Nov 23, 2022
ErickWendel
approved these changes
Nov 23, 2022
Contributor
Author
|
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. |
a81c9cc to
43e9046
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
Trott
approved these changes
Dec 1, 2022
Collaborator
|
Landed in 8950240 |
Member
|
@MoLow Did this indeed fix the flakiness of the test? node/test/sequential/sequential.status Lines 10 to 12 in c3537ae But the referenced issue #44898 has been closed following this PR. |
Member
|
I am not sure what is the way to verify that, it does not appear in the latest reports in https://github.com/nodejs/reliability |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes flakiness in watch mode tests in
test/sequential/test-watch-mode.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 which caused logs to appear in an unexpected order, thus failing the assertions in various test cases.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
test gets
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