-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test_runner: graceful termination on
--test
only
PR-URL: #43977 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Nitzan Uziely <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
- Loading branch information
Showing
4 changed files
with
43 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const test = require('node:test'); | ||
const { setTimeout } = require('timers/promises'); | ||
|
||
// We are using a very large timeout value to ensure that the parent process | ||
// will have time to send a SIGINT signal to cancel the test. | ||
test('never ending test', () => setTimeout(100_000_000)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const test = require('node:test'); | ||
|
||
test('never ending test', () => { | ||
while (true); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters