Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
test_runner: run global after() hook earlier#49059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
cjihrig commented Aug 7, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Aug 7, 2023
Review requested:
|
MoLow commented Aug 10, 2023
can you please also add this test? https://github.com/MoLow/node/blob/test-runner-only/test/fixtures/test-runner/output/async-test-scheduling.mjs |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Aug 10, 2023
nodejs-github-bot commented Aug 11, 2023
nodejs-github-bot commented Aug 11, 2023
nodejs-github-bot commented Aug 11, 2023 • edited by cjihrig
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by cjihrig
Uh oh!
There was an error while loading. Please reload this page.
| })); | ||
| after(common.mustCall(()=>{ | ||
| server.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjihrig would it be worth ensuring the after hook also waits for cb?
| server.close(); | |
| server.close(common.mustCall()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not a bad idea. Honestly though, the CI was a pain to get passing yesterday and I would prefer not to start over for that change.
mcollina left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
nodejs-github-bot commented Aug 11, 2023
Commit Queue failed- Loading data for nodejs/node/pull/49059 ✔ Done loading data for nodejs/node/pull/49059 ----------------------------------- PR info ------------------------------------ Title test_runner: run global after() hook earlier (#49059) Author Colin Ihrig (@cjihrig) Branch cjihrig:after-handles -> nodejs:main Labels commit-queue-squash, test_runner Commits 3 - test_runner: run global after() hook earlier - test and feedback - other test Committers 1 - cjihrig PR-URL: https://github.com/nodejs/node/pull/49059 Fixes: https://github.com/nodejs/node/issues/49056 Reviewed-By: Chemi Atlow Reviewed-By: Moshe Atlow Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/49059 Fixes: https://github.com/nodejs/node/issues/49056 Reviewed-By: Chemi Atlow Reviewed-By: Moshe Atlow Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 07 Aug 2023 22:03:17 GMT ✔ Approvals: 4 ✔ - Chemi Atlow (@atlowChemi): https://github.com/nodejs/node/pull/49059#pullrequestreview-1573038132 ✔ - Moshe Atlow (@MoLow) (TSC): https://github.com/nodejs/node/pull/49059#pullrequestreview-1573061500 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/49059#pullrequestreview-1573130592 ✔ - Benjamin Gruenbaum (@benjamingr) (TSC): https://github.com/nodejs/node/pull/49059#pullrequestreview-1573170558 ✘ Last GitHub CI failed ℹ Last Full PR CI on 2023-08-11T03:28:19Z: https://ci.nodejs.org/job/node-test-pull-request/53165/ - Querying data for job/node-test-pull-request/53165/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/5832906334 |
This commit moves the global after() hook execution from the 'beforeExit' event to the point where all tests have finished running. This gives the global after() a chance to clean up handles that would otherwise prevent the 'beforeExit' event from being emitted. PR-URL: nodejs#49059Fixes: nodejs#49056 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
cjihrig commented Aug 11, 2023
Landed in 6346bdc. |
joyeecheung commented Aug 11, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Not sure why but I am now constantly failing See stack traceI am on Apple M2 Max with macOS 13.4 though not sure how relevant that is. |
cjihrig commented Aug 11, 2023
FWIW, here is the fix before the revert: diff --git a/lib/internal/test_runner/test.js b/lib/internal/test_runner/test.js index f8c9087f6c..975ad4ac08 100644 --- a/lib/internal/test_runner/test.js+++ b/lib/internal/test_runner/test.js@@ -662,7 +662,7 @@ class Test extends AsyncResource{} } - if (this.parent !== null){+ if (this.parent !== null || typeof this.hookType === 'string'){ // Clean up the test. Then, try to report the results and execute any // tests that were pending due to available concurrency. // |
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (nodejs#49059 (comment)) and an additional common.mustCall() in the added test. Refs: nodejs#49059 Refs: nodejs#49110
This commit moves the global after() hook execution from the 'beforeExit' event to the point where all tests have finished running. This gives the global after() a chance to clean up handles that would otherwise prevent the 'beforeExit' event from being emitted. PR-URL: nodejs#49059Fixes: nodejs#49056 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (#49059 (comment)) and an additional common.mustCall() in the added test. Refs: #49059 Refs: #49110 PR-URL: #49116 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit moves the global after() hook execution from the 'beforeExit' event to the point where all tests have finished running. This gives the global after() a chance to clean up handles that would otherwise prevent the 'beforeExit' event from being emitted. PR-URL: nodejs#49059Fixes: nodejs#49056 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit moves the global after() hook execution from the 'beforeExit' event to the point where all tests have finished running. This gives the global after() a chance to clean up handles that would otherwise prevent the 'beforeExit' event from being emitted. PR-URL: nodejs#49059Fixes: nodejs#49056 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (nodejs#49059 (comment)) and an additional common.mustCall() in the added test. Refs: nodejs#49059 Refs: nodejs#49110 PR-URL: nodejs#49116 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit moves the global after() hook execution from the 'beforeExit' event to the point where all tests have finished running. This gives the global after() a chance to clean up handles that would otherwise prevent the 'beforeExit' event from being emitted. PR-URL: #49059Fixes: #49056 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (#49059 (comment)) and an additional common.mustCall() in the added test. Refs: #49059 Refs: #49110 PR-URL: #49116 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit moves the global after() hook execution from the 'beforeExit' event to the point where all tests have finished running. This gives the global after() a chance to clean up handles that would otherwise prevent the 'beforeExit' event from being emitted. PR-URL: nodejs#49059Fixes: nodejs#49056 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (nodejs#49059 (comment)) and an additional common.mustCall() in the added test. Refs: nodejs#49059 Refs: nodejs#49110 PR-URL: nodejs#49116 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit moves the global after() hook execution from the 'beforeExit' event to the point where all tests have finished running. This gives the global after() a chance to clean up handles that would otherwise prevent the 'beforeExit' event from being emitted. PR-URL: nodejs#49059Fixes: nodejs#49056 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (nodejs#49059 (comment)) and an additional common.mustCall() in the added test. Refs: nodejs#49059 Refs: nodejs#49110 PR-URL: nodejs#49116 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (#49059 (comment)) and an additional common.mustCall() in the added test. Refs: #49059 Refs: #49110 PR-URL: #49116 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (nodejs#49059 (comment)) and an additional common.mustCall() in the added test. Refs: nodejs#49059 Refs: nodejs#49110 PR-URL: nodejs#49116 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (nodejs#49059 (comment)) and an additional common.mustCall() in the added test. Refs: nodejs#49059 Refs: nodejs#49110 PR-URL: nodejs#49116 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (#49059 (comment)) and an additional common.mustCall() in the added test. Refs: #49059 Refs: #49110 PR-URL: #49116 Backport-PR-URL: #49225 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (#49059 (comment)) and an additional common.mustCall() in the added test. Refs: #49059 Refs: #49110 PR-URL: #49116 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (nodejs/node#49059 (comment)) and an additional common.mustCall() in the added test. Refs: nodejs/node#49059 Refs: nodejs/node#49110 PR-URL: nodejs/node#49116 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit reverts the revert in bb52656. It also includes the fix for the issue that required the revert (nodejs/node#49059 (comment)) and an additional common.mustCall() in the added test. Refs: nodejs/node#49059 Refs: nodejs/node#49110 PR-URL: nodejs/node#49116 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This commit moves the global
after()hook execution from the'beforeExit'event to the point where all tests have finished running. This gives the globalafter()a chance to clean up handles that would otherwise prevent the'beforeExit'event from being emitted.Fixes: #49056