From 796749c80718c51c5b2ca269c9b540b7b86cb6c4 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Sat, 7 Dec 2024 00:30:04 +0900 Subject: [PATCH] test(ext/node): remove flaky node:dgram compat test case (#27249) --- tests/node_compat/config.jsonc | 1 - tests/node_compat/runner/TODO.md | 3 +- .../test-dgram-connect-send-empty-packet.js | 35 ------------------- 3 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 tests/node_compat/test/parallel/test-dgram-connect-send-empty-packet.js diff --git a/tests/node_compat/config.jsonc b/tests/node_compat/config.jsonc index e7d4e9b944..105341109c 100644 --- a/tests/node_compat/config.jsonc +++ b/tests/node_compat/config.jsonc @@ -348,7 +348,6 @@ "test-dgram-connect-send-default-host.js", "test-dgram-connect-send-empty-array.js", "test-dgram-connect-send-empty-buffer.js", - "test-dgram-connect-send-empty-packet.js", "test-dgram-connect-send-multi-buffer-copy.js", "test-dgram-connect-send-multi-string-array.js", "test-dgram-connect.js", diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index 994ae84b89..09d68aded7 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -1,7 +1,7 @@ # Remaining Node Tests -1164 tests out of 3681 have been ported from Node 20.11.1 (31.62% ported, 68.89% remaining). +1163 tests out of 3681 have been ported from Node 20.11.1 (31.59% ported, 68.92% 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. @@ -489,6 +489,7 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-dgram-cluster-bind-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-cluster-bind-error.js) - [parallel/test-dgram-cluster-close-during-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-cluster-close-during-bind.js) - [parallel/test-dgram-cluster-close-in-listening.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-cluster-close-in-listening.js) +- [parallel/test-dgram-connect-send-empty-packet.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect-send-empty-packet.js) - [parallel/test-dgram-create-socket-handle-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-create-socket-handle-fd.js) - [parallel/test-dgram-create-socket-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-create-socket-handle.js) - [parallel/test-dgram-deprecation-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-deprecation-error.js) diff --git a/tests/node_compat/test/parallel/test-dgram-connect-send-empty-packet.js b/tests/node_compat/test/parallel/test-dgram-connect-send-empty-packet.js deleted file mode 100644 index 8c4d52af82..0000000000 --- a/tests/node_compat/test/parallel/test-dgram-connect-send-empty-packet.js +++ /dev/null @@ -1,35 +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.connect(client.address().port, common.mustCall(() => { - client.on('message', common.mustCall(callback)); - const buf = Buffer.alloc(1); - - const interval = setInterval(function() { - client.send(buf, 0, 0, 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(); - } - } - })); -}));