Repository: denoland/deno
Pull request: test(ext/node): disable flaky dgram tests

closes #27316

Changed files:
filename: tests/node_compat/config.jsonc
patch: @@ -368,9 +368,11 @@
       "test-dgram-send-callback-multi-buffer.js",
       "test-dgram-send-callback-recursive.js",
       "test-dgram-send-default-host.js",
-      "test-dgram-send-empty-array.js",
-      "test-dgram-send-empty-buffer.js",
-      "test-dgram-send-empty-packet.js",
+      // TODO(kt3k): These tests are flaky on macOS CI.
+      // https://github.com/denoland/deno/issues/27316
+      // "test-dgram-send-empty-array.js",
+      // "test-dgram-send-empty-buffer.js",
+      // "test-dgram-send-empty-packet.js",
       "test-dgram-send-error.js",
       "test-dgram-send-invalid-msg-type.js",
       "test-dgram-send-multi-buffer-copy.js",

filename: tests/node_compat/runner/TODO.md
patch: @@ -1,7 +1,7 @@
 <!-- deno-fmt-ignore-file -->
 # Remaining Node Tests
 
-1155 tests out of 3681 have been ported from Node 20.11.1 (31.38% ported, 69.14% remaining).
+1152 tests out of 3681 have been ported from Node 20.11.1 (31.30% ported, 69.22% remaining).
 
 NOTE: This file should not be manually edited. Please edit `tests/node_compat/config.json` and run `deno task setup` in `tests/node_compat/runner` dir instead.
 
@@ -499,6 +499,9 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co
 - [parallel/test-dgram-multicast-set-interface.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-multicast-set-interface.js)
 - [parallel/test-dgram-multicast-setTTL.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-multicast-setTTL.js)
 - [parallel/test-dgram-send-address-types.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-address-types.js)
+- [parallel/test-dgram-send-empty-array.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-empty-array.js)
+- [parallel/test-dgram-send-empty-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-empty-buffer.js)
+- [parallel/test-dgram-send-empty-packet.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-empty-packet.js)
 - [parallel/test-dgram-send-queue-info.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-queue-info.js)
 - [parallel/test-dgram-sendto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-sendto.js)
 - [parallel/test-dgram-setBroadcast.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-setBroadcast.js)

filename: tests/node_compat/test/parallel/test-dgram-send-empty-array.js
patch: @@ -1,32 +0,0 @@
-// deno-fmt-ignore-file
-// deno-lint-ignore-file
-
-// Copyright Joyent and Node contributors. All rights reserved. MIT license.
-// Taken from Node 20.11.1
-// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
-
-'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);

filename: tests/node_compat/test/parallel/test-dgram-send-empty-buffer.js
patch: @@ -1,50 +0,0 @@
-// deno-fmt-ignore-file
-// deno-lint-ignore-file
-
-// Copyright Joyent and Node contributors. All rights reserved. MIT license.
-// Taken from Node 20.11.1
-// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
-
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-'use strict';
-const common = require('../common');
-
-const assert = require('assert');
-const dgram = require('dgram');
-
-const client = dgram.createSocket('udp4');
-
-client.bind(0, common.mustCall(function() {
-  const port = this.address().port;
-
-  client.on('message', common.mustCall(function onMessage(buffer) {
-    assert.strictEqual(buffer.length, 0);
-    clearInterval(interval);
-    client.close();
-  }));
-
-  const buf = Buffer.alloc(0);
-  const interval = setInterval(function() {
-    client.send(buf, 0, 0, port, '127.0.0.1', common.mustCall());
-  }, 10);
-}));

filename: tests/node_compat/test/parallel/test-dgram-send-empty-packet.js
patch: @@ -1,36 +0,0 @@
-// deno-fmt-ignore-file
-// deno-lint-ignore-file
-
-// Copyright Joyent and Node contributors. All rights reserved. MIT license.
-// Taken from Node 20.11.1
-// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
-
-'use strict';
-const common = require('../common');
-
-const assert = require('assert');
-const dgram = require('dgram');
-
-const client = dgram.createSocket('udp4');
-
-client.bind(0, common.mustCall(function() {
-
-  client.on('message', common.mustCall(callback));
-
-  const port = this.address().port;
-  const buf = Buffer.alloc(1);
-
-  const interval = setInterval(function() {
-    client.send(buf, 0, 0, port, '127.0.0.1', common.mustCall(callback));
-  }, 10);
-
-  function callback(firstArg) {
-    // If client.send() callback, firstArg should be null.
-    // If client.on('message') listener, firstArg should be a 0-length buffer.
-    if (firstArg instanceof Buffer) {
-      assert.strictEqual(firstArg.length, 0);
-      clearInterval(interval);
-      client.close();
-    }
-  }
-}));