Skip to content

Commit ce2d434

Browse files
TrottMyles Borins
authored and
Myles Borins
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 53de0c2 commit ce2d434

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

+2-7
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,13 @@ const assert = require('assert');
66
const dgram = require('dgram');
77
const client = dgram.createSocket('udp4');
88

9-
const timer = setTimeout(function() {
10-
throw new Error('Timeout');
11-
}, common.platformTimeout(200));
12-
139
const buf = Buffer.allocUnsafe(256);
1410
const offset = 20;
1511
const len = buf.length - offset;
1612

1713
const messageSent = common.mustCall(function messageSent(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)