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 targos committed May 1, 2021
1 parent ecc8551 commit d6ab9bf
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 d6ab9bf

Please sign in to comment.