mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 12:03:30 +00:00

Three tests are skipped because of Applie bug 17894467. That bug exists in OS X 10.10, but we no longer support 10.10 (and neither does Apple). Remove the test-skipping. PR-URL: https://github.com/nodejs/node/pull/22546 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
26 lines
599 B
JavaScript
26 lines
599 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
const assert = require('assert');
|
|
const dgram = require('dgram');
|
|
|
|
const client = dgram.createSocket('udp4');
|
|
|
|
let interval;
|
|
|
|
client.on('message', common.mustCall(function onMessage(buf, info) {
|
|
const expected = Buffer.alloc(0);
|
|
assert.ok(buf.equals(expected), `Expected empty message but got ${buf}`);
|
|
clearInterval(interval);
|
|
client.close();
|
|
}));
|
|
|
|
client.on('listening', common.mustCall(function() {
|
|
interval = setInterval(function() {
|
|
client.send([], client.address().port, common.localhostIPv4);
|
|
}, 10);
|
|
}));
|
|
|
|
client.bind(0);
|