Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

test-net-timeout: make it pass on Windows

The test didn't take into account that some time might pass before
libuv makes close callbacks. This is now fixed.
  • Loading branch information...
piscisaureus committed Jun 13, 2012
1 parent e4f4c63 commit 5209dad9073136153fa901d1c80f96458b4d3cf8
Showing with 8 additions and 3 deletions.
  1. +8 −3 test/gc/test-net-timeout.js
@@ -56,9 +56,14 @@ function status() {
console.log('Done: %d/%d', done, todo);
console.log('Collected: %d/%d', countGC, count);
if (done === todo) {
console.log('All should be collected now.');
assert(count === countGC);
process.exit(0);
/* Give libuv some time to make close callbacks. */
setTimeout(function() {
gc();
console.log('All should be collected now.');
console.log('Collected: %d/%d', countGC, count);
assert(count === countGC);
process.exit(0);
}, 200);
}
}

0 comments on commit 5209dad

Please sign in to comment.
You can’t perform that action at this time.