-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: fix flaky browser-multiple.test.ts #7510
test: fix flaky browser-multiple.test.ts #7510
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
I don't think this fixes the issue, there must be something more to this
@@ -11,6 +11,9 @@ it('automatically assigns the port', async () => { | |||
onTestFinished(() => spy.mockRestore()) | |||
let ctx: Vitest | |||
let urls: (string | undefined)[] = [] | |||
// override default port since it can conflicts with | |||
// other browser mode tests in test/cli suite |
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.
test/cli runs sequentially, they should not affect each other
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.
I don't think it's sequential. I noticed config has thread options
vitest/test/cli/vitest.config.ts
Lines 8 to 12 in 25e6fe8
poolOptions: { | |
threads: { | |
singleThread: true, | |
}, | |
}, |
Is this meant to be singleFork
? or fileParallelism: false
is 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.
Yes, it's supposed to make tests run sequentially
Description
This one keeps failing, so I added a quick workaround.Fixed by makingtest/cli
sequential withsingleFork
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.