test_runner: don't exceed call stack when filtering#52488
Closed
cjihrig wants to merge 2 commits intonodejs:mainfrom
Closed
test_runner: don't exceed call stack when filtering#52488cjihrig wants to merge 2 commits intonodejs:mainfrom
cjihrig wants to merge 2 commits intonodejs:mainfrom
Conversation
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.
Collaborator
|
Review requested:
|
anonrig
approved these changes
Apr 12, 2024
atlowChemi
approved these changes
Apr 12, 2024
Collaborator
Collaborator
Member
|
(not sure what the semverness of timing changes is) |
Contributor
Author
|
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
MoLow
approved these changes
Apr 13, 2024
Collaborator
|
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>
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
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.jsto do that.