-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 wrongfully printed diagnostic warning while only: false
#54116
Conversation
Co-author: rstagi <r.stagi96@gmail.com>
Review requested:
|
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
This comment was marked as outdated.
This comment was marked as outdated.
lgtm. Thanks for the quick fix 💯 |
@@ -403,3 +404,41 @@ test('assertion errors display actual and expected properly', async () => { | |||
throw err; | |||
} | |||
}); | |||
|
|||
describe('should NOT print --test-only diagnostic warning - describe-only-false', {only: false}, () => { |
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.
Can we put these changes in a new test. This fixture is run with a variety of reporters and makes the diff get really noisy. Some of these are already getting quite large and more difficult to debug as new changes are introduced.
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.
Hey @cjihrig, thanks for your super-fast feedback 🚀
I moved the tests to a new file and added it to test-runner-output.mjs
.
Hope that's fine!
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
I have taken a look at the failing tests and I don't think they are related to the content of this PR. Is there anything I can do? |
Commit Queue failed- Loading data for nodejs/node/pull/54116 ✔ Done loading data for nodejs/node/pull/54116 ----------------------------------- PR info ------------------------------------ Title test_runner: fix wrongfully printed diagnostic warning while `only: false` (#54116) Author Pietro Marchini <pietro.marchini94@gmail.com> (@pmarchini) Branch pmarchini:issue/54052 -> nodejs:main Labels needs-ci, test_runner Commits 2 - test_runner: fix erroneous diagnostic warning when only: false - test_runner: move --test-only diagnostic warning tests to separate file Committers 1 - Pietro Marchini <pietro.marchini94@gmail.com> PR-URL: https://github.com/nodejs/node/pull/54116 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/54116 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> -------------------------------------------------------------------------------- ℹ This PR was created on Tue, 30 Jul 2024 08:22:52 GMT ✔ Approvals: 3 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/54116#pullrequestreview-2210346753 ✔ - Colin Ihrig (@cjihrig): https://github.com/nodejs/node/pull/54116#pullrequestreview-2210195050 ✔ - Moshe Atlow (@MoLow) (TSC): https://github.com/nodejs/node/pull/54116#pullrequestreview-2214826060 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2024-08-06T07:32:09Z: https://ci.nodejs.org/job/node-test-pull-request/60904/ - Querying data for job/node-test-pull-request/60904/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 54116 From https://github.com/nodejs/node * branch refs/pull/54116/merge -> FETCH_HEAD ✔ Fetched commits as a3ff3e8cd47a..bbe850404425 -------------------------------------------------------------------------------- Auto-merging lib/internal/test_runner/test.js [main 6061a8fca4] test_runner: fix erroneous diagnostic warning when only: false Author: Pietro Marchini <pietro.marchini94@gmail.com> Date: Tue Jul 30 10:21:34 2024 +0200 11 files changed, 744 insertions(+), 259 deletions(-) Auto-merging test/parallel/test-runner-output.mjs [main b826a7de97] test_runner: move --test-only diagnostic warning tests to separate file Author: Pietro Marchini <pietro.marchini94@gmail.com> Date: Wed Jul 31 08:50:07 2024 +0200 11 files changed, 414 insertions(+), 679 deletions(-) create mode 100644 test/fixtures/test-runner/output/test-diagnostic-warning-without-test-only-flag.js create mode 100644 test/fixtures/test-runner/output/test-diagnostic-warning-without-test-only-flag.snapshot ✔ Patches applied There are 2 commits in the PR. Attempting autorebase. Rebasing (2/4)https://github.com/nodejs/node/actions/runs/10291338532 |
Landed in 88bac52 |
Co-author: rstagi <r.stagi96@gmail.com> PR-URL: #54116 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
This PR should address #54052 🐍
The issue (a diagnostic warning printed when
only
is set tofalse
) is caused byrunOnlySubtests
being set as the negation ofthis.only
on the subtest.We have added the repro provided by @UziTech to the snapshot tests.
A question arose while checking the logic:
Given:
Is it correct that
this subtest is run - 4
is being run even thoughrunOnly
is set in the parent test?Should
runOnly
be propagated to subtests as well, or is it intended only for "sibling" tests?Additionally, we recognized the
runOnlySubtests
propagation change, but we may have missed other changes that might result in breaking functionality. All the current tests seem to be passing, so no relevant changes have been found on the tested paths. Do you notice anything else that we might have broken here?Co-author: rstagi r.stagi96@gmail.com