-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: try to reduce flakes on Windows #28035
Conversation
This comment has been minimized.
This comment has been minimized.
/CC @nodejs/testing |
Shouldn't the subsystem prefix here just be |
297daf1
to
9c57dea
Compare
Please could you add a brief sentence or two in the commit message as to why? |
Fixed. |
9c57dea
to
b557192
Compare
Wrote some words. Didn't have anything too enlightening 🤷♂.
|
This comment has been minimized.
This comment has been minimized.
c869ded
to
ccf9100
Compare
This comment has been minimized.
This comment has been minimized.
rmdir
first on windowsrmdir
first on windows
55fd037
to
a17d5ba
Compare
This comment has been minimized.
This comment has been minimized.
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 if CI is green and once info about opts
is added to the tmpdir.refresh()
entry in test/common/README.md
.
@nodejs/platform-windows |
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 but it seems like on Windows it will now always try both ways, even though the folder might already be deleted by rmdir
.
// On Windows first try to delegate rmdir to a shell. | ||
if (process.platform === 'win32' && st.isDirectory()) { | ||
try { | ||
execSync(`rmdir /q /s ${pathname}`, { timout: 1000 }); |
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.
If everything passes, should this not return?
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.
Not totally sure why, but it's not trivial https://ci.nodejs.org/job/node-test-binary-windows-2/1275/
Is this intended to fix failures like below?
|
Exactly. |
91c51b2
to
bf5b8e8
Compare
This comment has been minimized.
This comment has been minimized.
bf5b8e8
to
4059eba
Compare
4059eba
to
e531a68
Compare
This comment has been minimized.
This comment has been minimized.
rmdir
first on windowse531a68
to
803a946
Compare
This comment has been minimized.
This comment has been minimized.
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 with minor doc update to the function signature
7fce3e9
to
60133a1
Compare
cmd's `rmdir` is hardened to deal with Windows edge cases, like lingering processes, indexing, and AV checks. So we give it a try first. * Added `opts = { spawn = true }` to opt-out of spawning * test-pipeconnectwrap.js - spawning messes up async_hooks state PR-URL: nodejs#28035 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
This makes temp dir names consistent whether we run in stand-alone mode, via `test.py` in single process, or in multi-process. PR-URL: nodejs#28035 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
PR-URL: nodejs#28035 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Also try to make more traceable. PR-URL: nodejs#28035 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
60133a1
to
65a5f7b
Compare
cmd's `rmdir` is hardened to deal with Windows edge cases, like lingering processes, indexing, and AV checks. So we give it a try first. * Added `opts = { spawn = true }` to opt-out of spawning * test-pipeconnectwrap.js - spawning messes up async_hooks state PR-URL: #28035 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
This makes temp dir names consistent whether we run in stand-alone mode, via `test.py` in single process, or in multi-process. PR-URL: #28035 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
PR-URL: #28035 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Also try to make more traceable. PR-URL: #28035 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
tmpdir
This makes temp dir names consistent whether we run in stand-alone mode,
via
test.py
in single process, or in multi-process.rmdir
first on Windowscmd's
rmdir
is hardened to deal with Windows edge cases, likelingering processes, indexing, and AV checks. So we give it a try first.
tmpdir
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes