node/test/parallel/test-dgram-send-empty-array.js
Rich Trott 968fc72ad1 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>
2016-11-01 22:03:47 -07:00

25 lines
561 B
JavaScript

'use strict';
const common = require('../common');
const assert = require('assert');
const dgram = require('dgram');
if (common.isOSX) {
common.skip('because of 17894467 Apple bug');
return;
}
const client = dgram.createSocket('udp4');
client.on('message', common.mustCall(function onMessage(buf, info) {
const expected = Buffer.alloc(0);
assert.ok(buf.equals(expected), 'message was received correctly');
client.close();
}));
client.on('listening', function() {
client.send([], this.address().port, common.localhostIPv4);
});
client.bind(0);