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

test: add runner watch mode isolation tests by pmarchini · Pull Request #54888 · nodejs/node · GitHub

/ node Public

test: add runner watch mode isolation tests - #54888

Merged
nodejs-github-bot merged 3 commits into
nodejs:mainfrom
pmarchini:test/test-runner-watch-mode-isolation
Sep 20, 2024
Merged

test: add runner watch mode isolation tests#54888
nodejs-github-bot merged 3 commits into
nodejs:mainfrom
pmarchini:test/test-runner-watch-mode-isolation

Conversation

Copy link
Copy Markdown
Member

This PR extends the existing tests for the Node.js test runner's --watch mode by adding support for the --experimental-test-isolation option.

@cjihrig I was unable to find a test that covers this combination.
I also noticed that the should run new tests when a new file is created in the watched directory test behaves differently depending on the isolation modes.
What do you think?

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Sep 11, 2024

cjihrig commented Sep 11, 2024

Copy link
Copy Markdown
Contributor

What do you think?

Without having investigated the discrepancy, I'd say they should behave the same.

codecov Bot commented Sep 11, 2024
edited
Loading

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.06%. Comparing base (6db320a) to head (0eab852).
Report is 526 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #54888      +/-   ##
==========================================
- Coverage   88.07%   88.06%   -0.01%     
==========================================
  Files         651      651              
  Lines      183538   183538              
  Branches    35861    35864       +3     
==========================================
- Hits       161652   161635      -17     
+ Misses      15145    15140       -5     
- Partials     6741     6763      +22     

see 34 files with indirect coverage changes

cjihrig left a comment

Copy link
Copy Markdown
Contributor

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

Mostly LGTM. Two small comments. Have you been able to identify why the one test fails without isolation?

Copy link
Copy Markdown
Contributor

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

We already skip the entire file at the very top when running on AIX.

Copy link
Copy Markdown
Member Author

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

done

Copy link
Copy Markdown
Contributor

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

Instead of an if statement, we could make it a TODO or SKIP test. TODO will run but a failure will not fail the test suite. SKIP won't run at all.

Copy link
Copy Markdown
Member Author

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

I left the comment because I was planning to fix the issue in this PR, but I haven't had the time in the last two days. I'm going to address your comments, and then I'll investigate the issue ASAP.
(Thanks, as always, for the feedback 😁)

Copy link
Copy Markdown
Member Author

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

updated! 🚀

Copy link
Copy Markdown
Member Author

Mostly LGTM. Two small comments. Have you been able to identify why the one test fails without isolation?

Hey @cjihrig, I just had the chance to take a look, and every time that a file changes (rename, delete, update), if we are in isolation none, then restartTestFile restarts all the tests without filtering based on the "added, updated, removed" logic.

I'll try to address this issue in a separate PR if you agree.

cjihrig commented Sep 14, 2024

Copy link
Copy Markdown
Contributor

That makes sense. Thanks for digging in. I'd say if you want to try working on it and think you can improve the experience then go for it! If not, it's still good to have these tests 😄

cjihrig added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 14, 2024

Copy link
Copy Markdown
Member Author

That makes sense. Thanks for digging in. I'd say if you want to try working on it and think you can improve the experience then go for it! If not, it's still good to have these tests 😄

I'll definitely give it a try 😁

github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 14, 2024

Copy link
Copy Markdown
Collaborator

pmarchini force-pushed the test/test-runner-watch-mode-isolation branch from 63a09ed to 0eab852 Compare September 15, 2024 08:49
mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 15, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 15, 2024

Copy link
Copy Markdown
Collaborator

nodejs-github-bot commented Sep 17, 2024
edited by jakecastelli
Loading

Copy link
Copy Markdown
Collaborator

cjihrig added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. and removed needs-ci PRs that need a full CI run. labels Sep 17, 2024

mcollina 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

lgtm

mcollina added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 20, 2024
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 Sep 20, 2024

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/54888
✔  Done loading data for nodejs/node/pull/54888
----------------------------------- PR info ------------------------------------
Title      test: add runner watch mode isolation tests (#54888)
Author     Pietro Marchini <pietro.marchini94@gmail.com> (@pmarchini)
Branch     pmarchini:test/test-runner-watch-mode-isolation -> nodejs:main
Labels     test, author ready
Commits    3
 - test: add runner watch mode isolation tests
 - test: remove unused skip
 - test: add todo test
Committers 1
 - Pietro Marchini <pietro.marchini94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54888
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/54888
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Wed, 11 Sep 2024 14:40:20 GMT
   ✔  Approvals: 2
   ✔  - Colin Ihrig (@cjihrig): https://github.com/nodejs/node/pull/54888#pullrequestreview-2308136143
   ✔  - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/54888#pullrequestreview-2318229689
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2024-09-17T00:43:41Z: https://ci.nodejs.org/job/node-test-pull-request/62489/
- Querying data for job/node-test-pull-request/62489/
   ✔  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
   99433a2d7a..f79fd03f41  main       -> origin/main
✔  origin/main is now up-to-date
main is out of sync with origin/main. Mismatched commits:
 - e84fdebd7b test_runner: add support for coverage via run()
 - f79fd03f41 test_runner: add support for coverage via run()
--------------------------------------------------------------------------------
HEAD is now at f79fd03f41 test_runner: add support for coverage via run()
   ✔  Reset to origin/main
- Downloading patch for 54888
From https://github.com/nodejs/node
 * branch                  refs/pull/54888/merge -> FETCH_HEAD
✔  Fetched commits as f79fd03f4161..0eab8529cfdc
--------------------------------------------------------------------------------
[main 2096064b13] test: add runner watch mode isolation tests
 Author: Pietro Marchini <pietro.marchini94@gmail.com>
 Date: Sun Sep 15 10:46:24 2024 +0200
 1 file changed, 27 insertions(+), 18 deletions(-)
[main 69a35d3c4d] test: remove unused skip
 Author: Pietro Marchini <pietro.marchini94@gmail.com>
 Date: Sun Sep 15 10:46:36 2024 +0200
 1 file changed, 3 insertions(+), 3 deletions(-)
[main 82759fbd55] test: add todo test
 Author: Pietro Marchini <pietro.marchini94@gmail.com>
 Date: Sun Sep 15 10:46:36 2024 +0200
 1 file changed, 7 insertions(+), 6 deletions(-)
   ✔  Patches applied
There are 3 commits in the PR. Attempting autorebase.
Rebasing (2/6)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: add runner watch mode isolation tests

PR-URL: #54888
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD ea69604a6f] test: add runner watch mode isolation tests
Author: Pietro Marchini <pietro.marchini94@gmail.com>
Date: Sun Sep 15 10:46:24 2024 +0200
1 file changed, 27 insertions(+), 18 deletions(-)
Rebasing (3/6)
Rebasing (4/6)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: remove unused skip

PR-URL: #54888
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 5dc478195c] test: remove unused skip
Author: Pietro Marchini <pietro.marchini94@gmail.com>
Date: Sun Sep 15 10:46:36 2024 +0200
1 file changed, 3 insertions(+), 3 deletions(-)
Rebasing (5/6)
Rebasing (6/6)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: add todo test

PR-URL: #54888
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 72ccb24833] test: add todo test
Author: Pietro Marchini <pietro.marchini94@gmail.com>
Date: Sun Sep 15 10:46:36 2024 +0200
1 file changed, 7 insertions(+), 6 deletions(-)

Successfully rebased and updated refs/heads/main.

ℹ Add commit-queue-squash label to land the PR as one commit, or commit-queue-rebase to land as separate commits.

https://github.com/nodejs/node/actions/runs/10960018630

avivkeller removed the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Sep 20, 2024
avivkeller added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. commit-queue Add this label to land a pull request using GitHub Actions. labels Sep 20, 2024

Copy link
Copy Markdown
Member

(Ignore my last [deleted] comment) I've added commit-queue-squash to this PR, it should be good to commit now.

cjihrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 20, 2024
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 20, 2024
nodejs-github-bot merged commit e35299a into nodejs:main Sep 20, 2024

Copy link
Copy Markdown
Collaborator

Landed in e35299a

targos pushed a commit that referenced this pull request Oct 4, 2024
PR-URL: #54888
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
aduh95 mentioned this pull request Oct 9, 2024
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

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL