-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test_runner: fix afterEach not running on test failures #45204
Conversation
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:
describe
should be adjusted as well and moved tofinally
:node/lib/internal/test_runner/test.js
Lines 749 to 753 in 789b7ee
await this[kRunHook]('after', hookArgs); if (this.parent?.hooks.afterEach.length > 0) { await this.parent[kRunHook]('afterEach', hookArgs); } - tests need to be added/adjusted
Could you please provide a test snippet or some more details? |
checkout the failing tests |
Working on it. |
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. |
@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
|
@MrJithil I pushed a fix; |
yeah, |
Thank you so much for the help and it's a really great work. Do we need the |
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 |
Landed in 3759935 |
test_runner: fix afterEach not running on test failures PR-URL: nodejs#45204 Fixes: 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: #45204 Fixes: #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#45204 Fixes: 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#45204 Fixes: 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#45204 Fixes: 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: #45204 Fixes: #45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: #45204 Fixes: #45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: #45204 Fixes: #45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
test_runner: fix afterEach not running on test failures PR-URL: #45204 Fixes: #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#45204 Fixes: nodejs/node#45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> (cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
PR-URL: nodejs/node#45204 Fixes: nodejs/node#45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> (cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
PR-URL: nodejs/node#45204 Fixes: nodejs/node#45192 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> (cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
PR-URL: nodejs/node#45204 Fixes: 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