Skip to content

test_runner: graceful termination on --test only#43977

Merged
nodejs-github-bot merged 9 commits intonodejs:mainfrom
MoLow:graceful-exit-on-test-runner-only
Jul 27, 2022
Merged

test_runner: graceful termination on --test only#43977
nodejs-github-bot merged 9 commits intonodejs:mainfrom
MoLow:graceful-exit-on-test-runner-only

Conversation

@MoLow
Copy link
Member

@MoLow MoLow commented Jul 25, 2022

this addresses feedback from #43549 (comment)
when running --test the event loop is not supposed to be blocked since it (noramlly) does not run user-land code,
so it is fairly safe to hook on SIGTERM/SIGINT in this case without risking ctr+c not working

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Jul 25, 2022
@MoLow MoLow requested a review from tniessen July 25, 2022 06:56
@MoLow MoLow requested a review from benjamingr July 25, 2022 06:57
@MoLow
Copy link
Member Author

MoLow commented Jul 25, 2022

@nodejs/test_runner

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jul 25, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 25, 2022
@nodejs-github-bot
Copy link
Collaborator

@tniessen tniessen requested a review from cjihrig July 25, 2022 09:05
@MoLow MoLow requested a review from aduh95 July 25, 2022 09:22
const test = require('node:test');

test('never ending test', () => {
while (true) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @tniessen :)

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@MoLow MoLow added the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 27, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 27, 2022
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/43977
✔  Done loading data for nodejs/node/pull/43977
----------------------------------- PR info ------------------------------------
Title      test_runner: graceful termination on `--test` only (#43977)
Author     Moshe Atlow  (@MoLow)
Branch     MoLow:graceful-exit-on-test-runner-only -> nodejs:main
Labels     author ready, needs-ci, dont-land-on-v14.x, dont-land-on-v16.x, commit-queue-squash, test_runner
Commits    9
 - test_runner: graceful termination on `--test` only
 - Update lib/internal/test_runner/harness.js
 - fix test
 - test infinate loop
 - lint
 - CR
 - cr
 - fix windows
 - CR
Committers 2
 - Moshe Atlow 
 - GitHub 
PR-URL: https://github.com/nodejs/node/pull/43977
Reviewed-By: Antoine du Hamel 
Reviewed-By: Nitzan Uziely 
Reviewed-By: Benjamin Gruenbaum 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/43977
Reviewed-By: Antoine du Hamel 
Reviewed-By: Nitzan Uziely 
Reviewed-By: Benjamin Gruenbaum 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Mon, 25 Jul 2022 06:56:31 GMT
   ✔  Approvals: 3
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/43977#pullrequestreview-1050874149
   ✔  - Nitzan Uziely (@linkgoron): https://github.com/nodejs/node/pull/43977#pullrequestreview-1050862651
   ✔  - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/43977#pullrequestreview-1049287575
   ✖  This PR needs to wait 11 more minutes to land
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2022-07-26T16:21:52Z: https://ci.nodejs.org/job/node-test-pull-request/45690/
- Querying data for job/node-test-pull-request/45690/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/2744686060

@nodejs-github-bot nodejs-github-bot added the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Jul 27, 2022
@MoLow MoLow added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Jul 27, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 27, 2022
@nodejs-github-bot nodejs-github-bot merged commit 26e2742 into nodejs:main Jul 27, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 26e2742

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants