Skip to content

Commit

Permalink
test: fix flaky test-net-timeout
Browse files Browse the repository at this point in the history
The check for an 800ms window makesw assumptions about a setTimeout()
not running late etc. Remove it.

Refs: #34289

PR-URL: #38060
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Trott authored and jasnell committed Apr 6, 2021
1 parent a0492ba commit 8b05e32
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions test/pummel/test-net-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const echo_server = net.createServer((socket) => {
});

socket.on('data', (d) => {
console.log(d);
socket.write(d);
});

Expand Down Expand Up @@ -105,7 +104,4 @@ process.on('exit', () => {
console.log(`diff = ${diff}`);

assert.ok(timeout < diff);

// Allow for 800 milliseconds more
assert.ok(diff < timeout + 800);
});

0 comments on commit 8b05e32

Please sign in to comment.