Skip to content

Commit 2ab3fcc

Browse files
Trottaddaleax
authored andcommitted
test: fix test-net-pingpong pummel test for non-IPv6 hosts
Use `common.hasIPv6` instead of an OS check for more reliable operation. PR-URL: #34359 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 7c7d3e3 commit 2ab3fcc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/pummel/test-net-pingpong.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@ function pingPongTest(host, on_complete) {
113113
pingPongTest('localhost');
114114
pingPongTest(null);
115115

116-
// This IPv6 isn't working on Solaris.
117-
if (!common.isSunOS) pingPongTest('::1');
116+
if (common.hasIPv6) pingPongTest('::1');
118117

119118
process.on('exit', function() {
120-
assert.strictEqual(tests_run, common.isSunOS ? 2 : 3);
119+
assert.strictEqual(tests_run, common.hasIPv6 ? 3 : 2);
121120
});

0 commit comments

Comments
 (0)