Skip to content

Commit 0fdfba8

Browse files
evanlucasMylesBorins
authored andcommitted
test: fix flaky test by removing timer
This fixes one of the tests that has been failing on CI on freebsd for a bit by removing an unnecessary timer. PR-URL: #9199 Fixes: #7929 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent e108f20 commit 0fdfba8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

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

+2-7
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@ const client = dgram.createSocket('udp4');
99
const buf = Buffer.allocUnsafe(256);
1010

1111
const onMessage = common.mustCall(function(err, bytes) {
12-
assert.strictEqual(err, null);
13-
assert.equal(bytes, buf.length);
14-
clearTimeout(timer);
12+
assert.ifError(err);
13+
assert.strictEqual(bytes, buf.length);
1514
client.close();
1615
});
1716

18-
const timer = setTimeout(function() {
19-
throw new Error('Timeout');
20-
}, common.platformTimeout(200));
21-
2217
client.send(buf, common.PORT, common.localhostIPv4, onMessage);

0 commit comments

Comments
 (0)