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 23d41fb

Browse filesBrowse files
Trottaddaleax
authored andcommitted
test: fix test-net-connect-econnrefused (again)
test-net-connect-econnrefused was recently fixed, but only in certain circumstances. This change allows it to succeed whether it is invoked with `node` or `tools/test.py`. Makes sure no Socket handles are left, which is what the test is trying to determine, rather than failing if there are no handles of any kind left. PR-URL: #25438 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 5fe7741 commit 23d41fb
Copy full SHA for 23d41fb

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/pummel/test-net-connect-econnrefused.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-net-connect-econnrefused.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ function pummel() {
5050
function check() {
5151
setTimeout(function() {
5252
assert.strictEqual(process._getActiveRequests().length, 0);
53-
assert.strictEqual(process._getActiveHandles().length, 1); // the timer
53+
const activeHandles = process._getActiveHandles();
54+
assert.ok(activeHandles.every((val) => val.constructor.name !== 'Socket'));
5455
check_called = true;
5556
}, 0);
5657
}

0 commit comments

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