Skip to content

Commit f99e698

Browse files
committed
test: remove arbitrary timer
`test-dgram-send-callback-buffer-length` was timing out (via the 200ms timeout in the code) on FreeBSD in CI. The 200ms timeout is arbitrary and not necessary. Remove it. PR-URL: #9197 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent f1a3755 commit f99e698

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

‎test/parallel/test-dgram-send-callback-buffer-length.js‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,13 @@ const assert = require('assert');
66
constdgram=require('dgram');
77
constclient=dgram.createSocket('udp4');
88

9-
consttimer=setTimeout(function(){
10-
thrownewError('Timeout');
11-
},common.platformTimeout(200));
12-
139
constbuf=Buffer.allocUnsafe(256);
1410
constoffset=20;
1511
constlen=buf.length-offset;
1612

1713
constmessageSent=common.mustCall(functionmessageSent(err,bytes){
18-
assert.notEqual(bytes,buf.length);
19-
assert.equal(bytes,buf.length-offset);
20-
clearTimeout(timer);
14+
assert.notStrictEqual(bytes,buf.length);
15+
assert.strictEqual(bytes,buf.length-offset);
2116
client.close();
2217
});
2318

0 commit comments

Comments
(0)