Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7e1f610

Browse filesBrowse files
apapirovskiaddaleax
authored andcommitted
test: fix flaky test-domain-timers
It's possible for this test to be extremely infrequently flaky if 1ms or more elapses between setting the two timeouts. In that case, the second timer will not fire and the test will fail. PR-URL: #21019 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
1 parent 2bbd99c commit 7e1f610
Copy full SHA for 7e1f610

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-domain-timers.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-domain-timers.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const timeoutd = domain.create();
2828

2929
timeoutd.on('error', common.mustCall(function(e) {
3030
assert.strictEqual(e.message, 'Timeout UNREFd');
31-
clearTimeout(timeout);
3231
}, 2));
3332

3433
let t;
@@ -38,6 +37,7 @@ timeoutd.run(function() {
3837
}, 0).unref();
3938

4039
t = setTimeout(function() {
40+
clearTimeout(timeout);
4141
throw new Error('Timeout UNREFd');
4242
}, 0);
4343
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.