mirror of https://github.com/nodejs/node.git
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: https://github.com/nodejs/node/pull/34359 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de>pull/34359/head
parent
a55b77d2d3
commit
5487054225
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue