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 <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • 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.