test: fix flaky test-net-timeout

The check for an 800ms window makesw assumptions about a setTimeout()
not running late etc. Remove it.

Refs: https://github.com/nodejs/node/pull/34289

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Rich Trott 2021-04-03 08:03:04 -07:00 committed by James M Snell
parent a0492ba391
commit 8b05e32519
No known key found for this signature in database
GPG Key ID: 7341B15C070877AC

View File

@ -45,7 +45,6 @@ const echo_server = net.createServer((socket) => {
});
socket.on('data', (d) => {
console.log(d);
socket.write(d);
});
@ -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);
});