mirror of
https://github.com/denoland/deno.git
synced 2024-12-18 05:14:21 -05:00
test(ext/node): remove flaky node:dgram compat test case (#27249)
This commit is contained in:
parent
07737b03bc
commit
796749c807
3 changed files with 2 additions and 37 deletions
|
@ -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",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- deno-fmt-ignore-file -->
|
||||
# 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)
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}));
|
||||
}));
|
Loading…
Reference in a new issue