-
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: don't exceed call stack when filtering #52488
Closed
Closed
Conversation
This file contains 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 commit moves the end of work check from postRun() to finalize(). The reasoning is that finalize() is guaranteed to run in the order that the tests are defined, while postRun() is not. This makes the check a little simpler.
This commit updates filteredRun() to call postRun() after a microtask instead of synchronously. Currently, if approximately 1,545 subtests are filtered, enough synchronous calls can be made to cause a call stack exceeded exception.
Review requested:
|
nodejs-github-bot
added
needs-ci
PRs that need a full CI run.
test_runner
Issues and PRs related to the test runner subsystem.
labels
Apr 12, 2024
anonrig
approved these changes
Apr 12, 2024
atlowChemi
approved these changes
Apr 12, 2024
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Apr 12, 2024
atlowChemi
added
the
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
Apr 12, 2024
atlowChemi
added
the
commit-queue-rebase
Add this label to allow the Commit Queue to land a PR in several commits.
label
Apr 12, 2024
benjamingr
approved these changes
Apr 12, 2024
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.
Is this semver major?
(not sure what the semverness of timing changes is) |
No, this change itself is not semver major, but it does build on a previous semver major - #52221. |
marco-ippolito
approved these changes
Apr 13, 2024
richardlau
added
dont-land-on-v18.x
PRs that should not land on the v18.x-staging branch and should not be released in v18.x.
dont-land-on-v20.x
PRs that should not land on the v20.x-staging branch and should not be released in v20.x.
dont-land-on-v21.x
labels
Apr 13, 2024
MoLow
approved these changes
Apr 13, 2024
cjihrig
added
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Apr 13, 2024
nodejs-github-bot
removed
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Apr 14, 2024
Landed in e0ed09d...11f8765 |
nodejs-github-bot
pushed a commit
that referenced
this pull request
Apr 14, 2024
This commit moves the end of work check from postRun() to finalize(). The reasoning is that finalize() is guaranteed to run in the order that the tests are defined, while postRun() is not. This makes the check a little simpler. PR-URL: #52488 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
nodejs-github-bot
pushed a commit
that referenced
this pull request
Apr 14, 2024
This commit updates filteredRun() to call postRun() after a microtask instead of synchronously. Currently, if approximately 1,545 subtests are filtered, enough synchronous calls can be made to cause a call stack exceeded exception. PR-URL: #52488 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
aduh95
pushed a commit
that referenced
this pull request
Apr 29, 2024
This commit moves the end of work check from postRun() to finalize(). The reasoning is that finalize() is guaranteed to run in the order that the tests are defined, while postRun() is not. This makes the check a little simpler. PR-URL: #52488 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
aduh95
pushed a commit
that referenced
this pull request
Apr 29, 2024
This commit updates filteredRun() to call postRun() after a microtask instead of synchronously. Currently, if approximately 1,545 subtests are filtered, enough synchronous calls can be made to cause a call stack exceeded exception. PR-URL: #52488 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 pending requests for changes, and a CI started.
commit-queue-rebase
Add this label to allow the Commit Queue to land a PR in several commits.
dont-land-on-v18.x
PRs that should not land on the v18.x-staging branch and should not be released in v18.x.
dont-land-on-v20.x
PRs that should not land on the v20.x-staging branch and should not be released in v20.x.
test_runner
Issues and PRs related to the test runner subsystem.
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.
test_runner: move end of work check to finalize()
This commit moves the end of work check from postRun() to
finalize(). The reasoning is that finalize() is guaranteed to
run in the order that the tests are defined, while postRun() is
not. This makes the check a little simpler.
test_runner: don't exceed call stack when filtering
This commit updates filteredRun() to call postRun() after a
microtask instead of synchronously. Currently, if approximately
1,545 subtests are filtered, enough synchronous calls can be
made to cause a call stack exceeded exception.
I'm not sure if it is a good use of CI cycles to run a few thousand no-op tests to try to exceed the maximum call stack size. If people want to do that, I can update
test/parallel/test-runner-filter-warning.js
to do that.