Browse Source

test: remove timer in test-dgram-send-empty-array

The timer is not necessary. The test will timeout via the test harness
if the test fails. This should resolve spurious CI failures.

PR-URL: https://github.com/nodejs/node/pull/9361
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
v6
Rich Trott 8 years ago
parent
commit
968fc72ad1
  1. 5
      test/parallel/test-dgram-send-empty-array.js

5
test/parallel/test-dgram-send-empty-array.js

@ -11,14 +11,9 @@ if (common.isOSX) {
const client = dgram.createSocket('udp4'); const client = dgram.createSocket('udp4');
const timer = setTimeout(function() {
throw new Error('Timeout');
}, common.platformTimeout(200));
client.on('message', common.mustCall(function onMessage(buf, info) { client.on('message', common.mustCall(function onMessage(buf, info) {
const expected = Buffer.alloc(0); const expected = Buffer.alloc(0);
assert.ok(buf.equals(expected), 'message was received correctly'); assert.ok(buf.equals(expected), 'message was received correctly');
clearTimeout(timer);
client.close(); client.close();
})); }));

Loading…
Cancel
Save