Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
test_runner: fix afterEach not running on test failures#45204
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
MrJithil commented Oct 27, 2022 • edited by MoLow
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by MoLow
Uh oh!
There was an error while loading. Please reload this page.
MoLow 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.
In general LGTM, a few comments:
describeshould be adjusted as well and moved tofinally:node/lib/internal/test_runner/test.js
Lines 749 to 753 in 789b7ee
awaitthis[kRunHook]('after',hookArgs); if(this.parent?.hooks.afterEach.length>0){ awaitthis.parent[kRunHook]('afterEach',hookArgs); } - tests need to be added/adjusted
MrJithil commented Oct 27, 2022 • 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.
Could you please provide a test snippet or some more details? |
MoLow commented Oct 27, 2022
checkout the failing tests |
MrJithil commented Oct 30, 2022
Working on it. |
MrJithil commented Nov 5, 2022
help needed to fix the test case. I can see the test file is failing with the latest release as well. I am confused, how to clean up or adjust the test case. Please provide some samples or feel free to commit to the PR. |
MoLow commented Nov 5, 2022
@MrJithil I took a look. node/lib/internal/test_runner/test.js Line 521 in 789b7ee
after this PR, if the afterEach hook failed there is no indication besides the parent test failing: see the output for these tests: node/test/message/test_runner_hooks.js Lines 73 to 77 in 789b7ee
![]() |
MoLow commented Nov 5, 2022
@MrJithil I pushed a fix; |
nodejs-github-bot commented Nov 5, 2022
Uh oh!
There was an error while loading. Please reload this page.
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 Nov 6, 2022
MoLow commented Nov 6, 2022
yeah, |
MrJithil commented Nov 6, 2022
Thank you so much for the help and it's a really great work. Do we need the |
nodejs-github-bot commented Nov 6, 2022
nodejs-github-bot commented Nov 6, 2022
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Nov 7, 2022
nodejs-github-bot commented Nov 7, 2022
Commit Queue failed- Loading data for nodejs/node/pull/45204 ✔ Done loading data for nodejs/node/pull/45204 ----------------------------------- PR info ------------------------------------ Title test_runner: fix afterEach not running on test failures (#45204) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch MrJithil:fix-45192 -> nodejs:main Labels needs-ci, dont-land-on-v14.x, commit-queue-squash, test_runner Commits 5 - test_runner: fix afterEach not running on test failures - fix - CR - CR - CR Committers 1 - Moshe Atlow PR-URL: https://github.com/nodejs/node/pull/45204 Fixes: https://github.com/nodejs/node/issues/45192 Reviewed-By: Benjamin Gruenbaum ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/45204 Fixes: https://github.com/nodejs/node/issues/45192 Reviewed-By: Benjamin Gruenbaum -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - test_runner: fix afterEach not running on test failures ⚠ - fix ⚠ - CR ⚠ - CR ⚠ - CR ℹ This PR was created on Thu, 27 Oct 2022 09:31:19 GMT ✔ Approvals: 1 ✔ - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/45204#pullrequestreview-1169503033 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2022-11-07T03:50:10Z: https://ci.nodejs.org/job/node-test-pull-request/47755/ - Querying data for job/node-test-pull-request/47755/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/3407846700 |
nodejs-github-bot commented Nov 7, 2022
Landed in 3759935 |
test_runner: fix afterEach not running on test failures PR-URL: nodejs#45204Fixes: nodejs#45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: #45204Fixes: #45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: nodejs#45204Fixes: nodejs#45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: nodejs#45204Fixes: nodejs#45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: nodejs#45204Fixes: nodejs#45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: #45204Fixes: #45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: #45204Fixes: #45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: #45204Fixes: #45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: #45204Fixes: #45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: nodejs/node#45204Fixes: nodejs/node#45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> (cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
PR-URL: nodejs/node#45204Fixes: nodejs/node#45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> (cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
PR-URL: nodejs/node#45204Fixes: nodejs/node#45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> (cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
PR-URL: nodejs/node#45204Fixes: nodejs/node#45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> (cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)

test_runner: fix afterEach not running on test failures
Fixes: #45192