Skip to content
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: add unexpected behavior repro test #55095

Conversation

pmarchini
Copy link
Member

I'm opening this PR as a draft since I have not had the time to fix the issue yet.
This test highlights what I believe to be an issue related to file watcher owners.

Basically, given a specific series of updates to files under watch, the link between the test file and its dependency is being lost.

@cjihrig @jakecastelli, FYI

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Sep 24, 2024
@jakecastelli
Copy link
Member

Thanks for bringing this up, I realised this bug as well, and I forgot to create an issue for it 😄

@avivkeller avivkeller added the test_runner Issues and PRs related to the test runner subsystem. label Sep 24, 2024
Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

I know this is a draft, I only have one nitpick

Comment on lines +62 to +70
if (testRuns.length === 1) {
firstRunCompleted.resolve();
} else if (testRuns.length === 2) {
secondRunCompleted.resolve();
} else if (testRuns.length === 3) {
thirdRunCompleted.resolve();
} else if (testRuns.length === 4) {
fourthRunCompleted.resolve();
}
Copy link
Member

Choose a reason for hiding this comment

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

Switch statement?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep no problem at all 🚀

@avivkeller avivkeller added wip Issues and PRs that are still a work in progress. watch-mode Issues and PRs related to watch mode labels Sep 24, 2024
@pmarchini
Copy link
Member Author

I'm closing this since another PR it's proposing a fix 🚀

@pmarchini pmarchini closed this Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. test Issues and PRs related to the tests. watch-mode Issues and PRs related to watch mode wip Issues and PRs that are still a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants