FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test_runner: fix afterEach not running on test failures by MrJithil · Pull Request #45204 · nodejs/node · GitHub

/ node Public

test_runner: fix afterEach not running on test failures - #45204

Merged
nodejs-github-bot merged 5 commits into
nodejs:mainfrom
MrJithil:fix-45192
Nov 7, 2022
Merged

test_runner: fix afterEach not running on test failures#45204
nodejs-github-bot merged 5 commits into
nodejs:mainfrom
MrJithil:fix-45192

Conversation

MrJithil commented Oct 27, 2022
edited by MoLow
Loading

Copy link
Copy Markdown
Member

test_runner: fix afterEach not running on test failures

Fixes: #45192

nodejs-github-bot added dont-land-on-v14.x needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Oct 27, 2022

MoLow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

In general LGTM, a few comments:

MrJithil commented Oct 27, 2022
edited
Loading

Copy link
Copy Markdown
Member Author

In general LGTM, a few comments:

Could you please provide a test snippet or some more details?

MoLow commented Oct 27, 2022

Copy link
Copy Markdown
Member

Could you please provide a test snippet or some more details?

checkout the failing tests

Copy link
Copy Markdown
Member Author

Working on it.

MrJithil commented Nov 5, 2022

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member

@MrJithil I took a look.
prior to this PR, tests was marked as passed only in case the afterEach hook passed, https://github.com/nodejs/node/blob/789b7eebff58d404ac8f060376a75e26b514f9af/lib/internal/test_runner/test.js#L521
after this PR, if the afterEach hook failed there is no indication besides the parent test failing:
see the output for these tests:
https://github.com/nodejs/node/blob/789b7eebff58d404ac8f060376a75e26b514f9af/test/message/test_runner_hooks.js#L73-L77

MoLow commented Nov 5, 2022

Copy link
Copy Markdown
Member

@MrJithil I pushed a fix;
@nodejs/test_runner I would appreciate a review

MoLow added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 5, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 5, 2022

Copy link
Copy Markdown
Collaborator

Comment thread lib/internal/test_runner/test.js Outdated
Comment thread lib/internal/test_runner/test.js Outdated
Comment thread lib/internal/test_runner/test.js Outdated
MoLow added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 6, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 6, 2022

Copy link
Copy Markdown
Collaborator

MoLow commented Nov 6, 2022

Copy link
Copy Markdown
Member

Do we need the out files?

yeah, tools/test.py compares the output with the actual result

MoLow added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Nov 6, 2022

MrJithil commented Nov 6, 2022

Copy link
Copy Markdown
Member Author

@MrJithil I pushed a fix;
@nodejs/test_runner I would appreciate a review

Thank you so much for the help and it's a really great work. Do we need the out files?

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Comment thread lib/internal/test_runner/test.js Outdated
MrJithil and others added 5 commits November 6, 2022 22:30

Copy link
Copy Markdown
Collaborator

MoLow added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 7, 2022
nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Nov 7, 2022

Copy link
Copy Markdown
Collaborator
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/.ncu
https://github.com/nodejs/node/actions/runs/3407846700

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 Nov 7, 2022
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 7, 2022
nodejs-github-bot merged commit 3759935 into nodejs:main Nov 7, 2022

Copy link
Copy Markdown
Collaborator

Landed in 3759935

RafaelGSS pushed a commit that referenced this pull request Nov 10, 2022
test_runner: fix afterEach not running on test failures

PR-URL: #45204
Fixes: #45192
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
RafaelGSS mentioned this pull request Nov 10, 2022
MoLow pushed a commit to MoLow/node that referenced this pull request Dec 9, 2022
test_runner: fix afterEach not running on test failures

PR-URL: nodejs#45204
Fixes: nodejs#45192
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
test_runner: fix afterEach not running on test failures

PR-URL: #45204
Fixes: #45192
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
test_runner: fix afterEach not running on test failures

PR-URL: #45204
Fixes: #45192
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
MoLow pushed a commit to MoLow/node-core-test that referenced this pull request Feb 2, 2023
test_runner: fix afterEach not running on test failures

PR-URL: nodejs/node#45204
Fixes: nodejs/node#45192
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
(cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
MoLow pushed a commit to MoLow/node-core-test that referenced this pull request Feb 2, 2023
PR-URL: nodejs/node#45204
Fixes: nodejs/node#45192
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
(cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
MoLow pushed a commit to MoLow/node-core-test that referenced this pull request Feb 2, 2023
PR-URL: nodejs/node#45204
Fixes: nodejs/node#45192
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
(cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
MoLow pushed a commit to MoLow/node-core-test that referenced this pull request Feb 2, 2023
PR-URL: nodejs/node#45204
Fixes: nodejs/node#45192
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
(cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

afterEach hook not executed when test fails

6 participants


Back | FazBrowse Home | New Git URL