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

Fix hang after multiple precompiled browser tests #2422

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

natebosch
Copy link
Member

Fixes #2294

Avoid creating extra unexpected BrowserManager instances by caching the
future in the _browserManagers map without any async delay. Previously
it was possible for two managers to be created if the second suite is
loaded before the first suite's compilerSupport was resolved. This was
not a problem for tests that get compiled by the test runner because the
compilation would delay the second suite load until after the first
suite's compilerSupport has resolved. It is not a problem when running
without concurrency because that delays the second suite load.

Add a concurrency argument to the regression test, otherwise the default
is to run with concurrency 1 which works around the bug.

Fixes #2294

Avoid creating extra unexpected BrowserManager instances by caching the
future in the `_browserManagers` map without any async delay. Previously
it was possible for two managers to be created if the second suite is
loaded before the first suite's `compilerSupport` was resolved. This was
not a problem for tests that get compiled by the test runner because the
compilation would delay the second suite load until after the first
suite's `compilerSupport` has resolved. It is not a problem when running
without concurrency because that delays the second suite load.

Add a concurrency argument to the regression test, otherwise the default
is to run with concurrency 1 which works around the bug.
@natebosch natebosch requested a review from jakemac53 December 4, 2024 03:38
@natebosch natebosch requested a review from a team as a code owner December 4, 2024 03:38
Copy link

github-actions bot commented Dec 4, 2024

PR Health

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Copy link

github-actions bot commented Dec 4, 2024

Package publishing

Package Version Status Publish tag (post-merge)
package:test 1.25.12 ready to publish test-v1.25.12
package:test_core 0.6.8 ready to publish test_core-v0.6.8
package:checks 0.3.1-wip WIP (no publish necessary)
package:fake_async 1.3.2 already published at pub.dev
package:matcher 0.12.18-wip WIP (no publish necessary)
package:test_api 0.7.4 already published at pub.dev

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@natebosch natebosch merged commit dc0f8ea into master Dec 4, 2024
69 of 70 checks passed
@natebosch natebosch deleted the browser-test-hang branch December 4, 2024 16:54
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Dec 9, 2024
Revisions updated by `dart tools/rev_sdk_deps.dart`.

core (https://github.com/dart-lang/core/compare/abcf992..7f9f597):
  7f9f597e  2024-12-03  Devon Carew  update the pubspec version of package:collection (dart-lang/core#730)

ecosystem (https://github.com/dart-lang/ecosystem/compare/248b180..b4b2a43):
  b4b2a43  2024-12-06  Moritz  Unsubmit donotsubmit (dart-lang/ecosystem#324)
  8749a2b  2024-12-06  Moritz  Updates to `health.yaml` (dart-lang/ecosystem#310)
  10fb2c0  2024-12-05  Moritz  Ecosystem testing (dart-lang/ecosystem#320)

test (https://github.com/dart-lang/test/compare/2096773..dc0f8ea):
  dc0f8ea4  2024-12-04  Nate Bosch  Fix hang after multiple precompiled browser tests (dart-lang/test#2422)

tools (https://github.com/dart-lang/tools/compare/1c5b8b9..223daf5):
  223daf53  2024-12-05  Ben Konyi  Update `package:vm_service` constraints to >=12.0.0 <16.0.0 (dart-lang/tools#1205)

vector_math (https://github.com/google/vector_math.dart/compare/433fb6c..bd4b574):
  bd4b574  2024-12-09  Plague Fox  Partial fix for benchmarks (google/vector_math.dart#337)

Change-Id: Ie5ce1e95647ac19af1dcfd1d5ee495659052ddc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399701
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Process hangs when running multiple concurrent precompiled browser test files
2 participants