Sitelet https://web.archive.org/web/20220319125803/https://github.com/nodejs/node/commit/2ab3fccdbc
Skip to content
Permalink
Browse files
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 <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
Trott authored and addaleax committed Sep 22, 2020
1 parent 7c7d3e3 commit 2ab3fccdbc999b6d64965ae3ec5e62c52a9cac25
Showing with 2 additions and 3 deletions.
  1. +2 −3 test/pummel/test-net-pingpong.js
@@ -113,9 +113,8 @@ function pingPongTest(host, on_complete) {
pingPongTest('localhost');
pingPongTest(null);

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

process.on('exit', function() {
assert.strictEqual(tests_run, common.isSunOS ? 2 : 3);
assert.strictEqual(tests_run, common.hasIPv6 ? 3 : 2);
});

0 comments on commit 2ab3fcc

Please sign in to comment.