test: only count restarts after the write in watch emit-restarted test · nodejs/node@cab5dce · GitHub
Skip to content

Commit cab5dce

Browse files
codebytereaduh95
authored andcommitted
test: only count restarts after the write in watch emit-restarted test
test-run-watch-emit-restarted expected exactly one test:watch:restarted event, but it starts run({ watch: true }) right after writing the fixtures into the watched directory. Watch backends that deliver events with some latency, FSEvents on macOS most visibly, can still report those setup writes once the first run is under way, which restarts it and makes the later, intentional write the second restart. The test has been marked flaky on macOS x64 for that reason. Wait for the first drain, then require that the write is followed by a restart and a drain, ignoring whatever the setup produced before it, and drop the flaky marker. Refs: #54534 Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com> PR-URL: #65780 Fixes: #64226 Refs: #59146 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent db0ca93 commit cab5dce

2 files changed

Lines changed: 12 additions & 17 deletions

File tree

Lines changed: 12 additions & 16 deletions

‎test/test-runner/test-runner.status‎

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)