From 3fc14dc5886b632f2593383c22bb4706cd11a663 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 14 Sep 2017 19:30:01 -0400 Subject: [PATCH] test: don't skip when common.mustCall() is pending The test parallel/test-dgram-multicast-set-interface.js was calling common.skip() on hosts that do not support IPv6. However, by this point, there were several outstanding common.mustCall() invocations. The process.exit() in common.skip() triggered those common.mustCall()s as errors. Fixes: https://github.com/nodejs/node/issues/15419 PR-URL: https://github.com/nodejs/node/pull/15421 Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott Reviewed-By: Daniel Bevenius Reviewed-By: Luigi Pinca Reviewed-By: Brian White Reviewed-By: Sakthipriyan Vairamani --- test/parallel/test-dgram-multicast-set-interface.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-dgram-multicast-set-interface.js b/test/parallel/test-dgram-multicast-set-interface.js index 4be6b15dba1969..c065683f53c7fd 100644 --- a/test/parallel/test-dgram-multicast-set-interface.js +++ b/test/parallel/test-dgram-multicast-set-interface.js @@ -72,10 +72,11 @@ const dgram = require('dgram'); })); } -if (!common.hasIPv6) { - common.skip('Skipping udp6 tests, no IPv6 support.'); +// If IPv6 is not supported, skip the rest of the test. However, don't call +// common.skip(), which calls process.exit() while there is outstanding +// common.mustCall() activity. +if (!common.hasIPv6) return; -} { const socket = dgram.createSocket('udp6');