-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: hooks should respect maxConcurrency
#9653
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
Merged
hi-ogawa
merged 38 commits into
vitest-dev:main
from
hi-ogawa:02-13-fix_beforeall_afterall_should_respect_maxconcurrency_
Feb 18, 2026
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
8435041
fix: `beforeAll/afterAll` should respect `maxConcurrency`
hi-ogawa e202b06
docs: update
hi-ogawa 4a709e7
docs: more
hi-ogawa bc91621
docs: clarify maxConcurrency includes concurrent hooks
hi-ogawa ab41161
docs: clarify maxConcurrency and sequence.hooks behavior
hi-ogawa f60f025
docs: simplify maxConcurrency wording and hook note
hi-ogawa 87f6d32
wip
hi-ogawa 5c32922
docs: tweak
hi-ogawa e5d6cdf
docs: tweak
hi-ogawa 5b314fd
test: fix concurrent
hi-ogawa 1e24af1
test: one
hi-ogawa e091de9
test: integration
hi-ogawa baa340e
test: remove old
hi-ogawa de530f2
test: add maxConcurrency deadlock coverage for concurrent hooks
hi-ogawa f0d08fd
test: add __suite_errors__ to errorTree
hi-ogawa 7b64acd
Merge branch 'main' into 02-13-fix_beforeall_afterall_should_respect_…
hi-ogawa 0e306b3
test: faster timeout
hi-ogawa 5a30feb
fix(runner): respect maxConcurrency for around hooks
hi-ogawa 6abaaa4
test: update concurrent
hi-ogawa fa19b20
test: more edge cases
hi-ogawa a02e84b
fix(runner): make around run callbacks non-throwing
hi-ogawa 0a63a78
Merge branch 'main' into 02-13-fix_beforeall_afterall_should_respect_…
hi-ogawa a5a0f2d
Revert "fix(runner): make around run callbacks non-throwing"
hi-ogawa fbe6b32
refactor: simplify acquire/release
hi-ogawa 34bf2df
chore: lint
hi-ogawa a9717bc
fix: release more
hi-ogawa c12ffc0
test: more
hi-ogawa d0a1adf
fix: preserve nested around hook failures and add regressions
hi-ogawa 00d1ec4
fix: fix errors order
hi-ogawa 6e679f8
Merge branch 'fix/issue-9669-around-hook-propagation' into 02-13-fix_…
hi-ogawa 02b8277
test: update
hi-ogawa e53955c
perf: reduce microtask
hi-ogawa afb8207
refactor: limitConcurrency
hi-ogawa 3895d7e
perf: reduce microtask
hi-ogawa 6f7d4de
chore: naming
hi-ogawa bb1382d
Merge branch 'main' into 02-13-fix_beforeall_afterall_should_respect_…
hi-ogawa 1fbdd6c
test: destructure { task }
hi-ogawa b64e8b5
Merge branch 'main' into 02-13-fix_beforeall_afterall_should_respect_…
hi-ogawa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
As I've put a lot more
limitConcurrencyin runner, I optimized this to reduce microtask as much as possible. This should cost only one microtask in the happy path (i.e. when not reaching limit) and two when limited. The previous implementation always paid three microtasks.