summaryrefslogtreecommitdiff
path: root/test/async-hooks
diff options
context:
space:
mode:
authorBartosz Sosnowski <bartosz@janeasystems.com>2020-03-25 15:05:22 +0100
committerAnna Henningsen <anna@addaleax.net>2020-03-29 22:33:33 +0200
commiteb553a473bc5ff2ad1b155774553122f4e52d231 (patch)
treed72dcc33251f9b3cf63cb6e0b22313ca2fda72ba /test/async-hooks
parentbc28daa9f7a73ce2c21984684315cf03925ca175 (diff)
downloadnode-new-eb553a473bc5ff2ad1b155774553122f4e52d231.tar.gz
test: unflake async-hooks/test-statwatcher
On Windows 2016 under high load further change events can be emitted after writing the 5 bytes is reported. Updating the mtime of the file can be reported as a separate change. This will increase the "before" count, but not the "w1HookCount" since we removed the listener. This makes the test keep the listeners until the end of the test. Fixes: https://github.com/nodejs/node/issues/21425 PR-URL: https://github.com/nodejs/node/pull/32484 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/async-hooks')
-rw-r--r--test/async-hooks/async-hooks.status2
-rw-r--r--test/async-hooks/test-statwatcher.js4
2 files changed, 0 insertions, 6 deletions
diff --git a/test/async-hooks/async-hooks.status b/test/async-hooks/async-hooks.status
index 9ad85147db..7f36d5a78a 100644
--- a/test/async-hooks/async-hooks.status
+++ b/test/async-hooks/async-hooks.status
@@ -7,8 +7,6 @@ prefix async-hooks
[true] # This section applies to all platforms
[$system==win32]
-# https://github.com/nodejs/node/issues/29852
-test-statwatcher: PASS,FLAKY
[$system==linux]
diff --git a/test/async-hooks/test-statwatcher.js b/test/async-hooks/test-statwatcher.js
index 0c1e245c4e..b8651ab8e0 100644
--- a/test/async-hooks/test-statwatcher.js
+++ b/test/async-hooks/test-statwatcher.js
@@ -64,8 +64,6 @@ w1.on('change', common.mustCallAtLeast((curr, prev) => {
// Wait until we get the write above.
if (prev.size !== 0 || curr.size !== 5)
return;
- // Remove listeners to make w1HookCount final
- w1.removeAllListeners('change');
setImmediate(() => {
checkInvocations(statwatcher1,
@@ -81,8 +79,6 @@ w1.on('change', common.mustCallAtLeast((curr, prev) => {
// Wait until we get the write above.
if (prev.size !== 0 || curr.size !== 5)
return;
- // Remove listeners to make w2HookCount final
- w2.removeAllListeners('change');
setImmediate(() => {
checkInvocations(statwatcher1,