From 86d977c86691a1db83eabaa3a44f91aa9e1dd863 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Wed, 1 Nov 2023 08:52:53 +0530 Subject: [PATCH] adding signal for killing zombie process --- test/fixtures/test-runner/timeout.js | 13 ++++++++----- test/parallel/test-runner-cli.js | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/test/fixtures/test-runner/timeout.js b/test/fixtures/test-runner/timeout.js index 5efc6a6c22dd709..534da8dec21ae42 100644 --- a/test/fixtures/test-runner/timeout.js +++ b/test/fixtures/test-runner/timeout.js @@ -3,11 +3,14 @@ const test = require('node:test'); const common = require('../../common'); const fixtures = require('../../common/fixtures'); -test('should support timeout', async () => { - const stream = test.run({files: [ - fixtures.path('test-runner', 'never_ending_sync.js'), - fixtures.path('test-runner', 'never_ending_async.js'), - ] }); +test('should support timeout', async ({ signal }) => { + const stream = test.run({ + signal, + files: [ + fixtures.path('test-runner', 'never_ending_sync.js'), + fixtures.path('test-runner', 'never_ending_async.js'), + ] + }); stream.on('test:fail', common.mustCall(2)); stream.on('test:pass', common.mustNotCall()); // eslint-disable-next-line no-unused-vars diff --git a/test/parallel/test-runner-cli.js b/test/parallel/test-runner-cli.js index a64ce8f99131ba0..97e151628126c60 100644 --- a/test/parallel/test-runner-cli.js +++ b/test/parallel/test-runner-cli.js @@ -116,6 +116,7 @@ const testFixtures = fixtures.path('test-runner'); } { + // Test --test-timeout flag const args = [ '--test', '--test-timeout',