Browse Source

test: fix test-process-active-wraps.js

b636ba8186 caused a regression
on Windows due to the way server handles are cleaned up. This
commit fixes the test by allowing the handle to be cleaned up.

Fixes: https://github.com/joyent/node/issues/8986
PR-URL: https://github.com/joyent/node/pull/8998
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
v0.11.15-release
cjihrig 10 years ago
parent
commit
1fad3730c2
  1. 6
      test/simple/test-process-active-wraps.js

6
test/simple/test-process-active-wraps.js

@ -65,9 +65,15 @@ var handles = [];
});
function onclose() {
if (++n === handles.length) {
// Allow the server handle a few loop iterations to wind down.
// This test is highly dependent on the implementation of handle
// closing. If this test breaks in the future, it does not
// necessarily mean that Node is broken.
setImmediate(function() {
setImmediate(function() {
assert.equal(process._getActiveHandles().length, 0);
});
});
}
}
})();

Loading…
Cancel
Save