From 3bf6fe93846354f49c4cec70fc910bb246cf9768 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Mon, 16 Dec 2024 13:51:45 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=82=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parallel/test-http-no-content-length.js | 44 ------------------- .../parallel/test-worker-fs-stat-watcher.js | 17 ------- .../test-worker-process-exit-async-module.js | 11 ----- 3 files changed, 72 deletions(-) delete mode 100644 test/js/node/test/parallel/test-http-no-content-length.js delete mode 100644 test/js/node/test/parallel/test-worker-fs-stat-watcher.js delete mode 100644 test/js/node/test/parallel/test-worker-process-exit-async-module.js diff --git a/test/js/node/test/parallel/test-http-no-content-length.js b/test/js/node/test/parallel/test-http-no-content-length.js deleted file mode 100644 index a3a51c015e..0000000000 --- a/test/js/node/test/parallel/test-http-no-content-length.js +++ /dev/null @@ -1,44 +0,0 @@ -// 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 net = require('net'); -const http = require('http'); - -const server = net.createServer(function(socket) { - // Neither Content-Length nor Connection - socket.end('HTTP/1.1 200 ok\r\n\r\nHello'); -}).listen(0, common.mustCall(function() { - http.get({ port: this.address().port }, common.mustCall(function(res) { - let body = ''; - - res.setEncoding('utf8'); - res.on('data', function(chunk) { - body += chunk; - }); - res.on('end', common.mustCall(function() { - assert.strictEqual(body, 'Hello'); - server.close(); - })); - })); -})); diff --git a/test/js/node/test/parallel/test-worker-fs-stat-watcher.js b/test/js/node/test/parallel/test-worker-fs-stat-watcher.js deleted file mode 100644 index c648792af7..0000000000 --- a/test/js/node/test/parallel/test-worker-fs-stat-watcher.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; -const common = require('../common'); -const { Worker, parentPort } = require('worker_threads'); -const fs = require('fs'); - -// Checks that terminating Workers does not crash the process if fs.watchFile() -// has active handles. - -// Do not use isMainThread so that this test itself can be run inside a Worker. -if (!process.env.HAS_STARTED_WORKER) { - process.env.HAS_STARTED_WORKER = 1; - const worker = new Worker(__filename); - worker.on('message', common.mustCall(() => worker.terminate())); -} else { - fs.watchFile(__filename, () => {}); - parentPort.postMessage('running'); -} diff --git a/test/js/node/test/parallel/test-worker-process-exit-async-module.js b/test/js/node/test/parallel/test-worker-process-exit-async-module.js deleted file mode 100644 index 38d4ad74c7..0000000000 --- a/test/js/node/test/parallel/test-worker-process-exit-async-module.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -const common = require('../common'); -const assert = require('assert'); -const { Worker } = require('worker_threads'); - -// Regression for https://github.com/nodejs/node/issues/43182. -const w = new Worker(new URL('data:text/javascript,process.exit(1);await new Promise(()=>{ process.exit(2); })')); -w.on('exit', common.mustCall((code) => { - assert.strictEqual(code, 1); -}));