test_docker: align container launch with playwright-browsers#1919
Merged
yury-s merged 2 commits intomicrosoft:mainfrom May 8, 2026
Merged
test_docker: align container launch with playwright-browsers#1919yury-s merged 2 commits intomicrosoft:mainfrom
yury-s merged 2 commits intomicrosoft:mainfrom
Conversation
cc2c173 to
d038c9e
Compare
3e97120 to
2b8392c
Compare
pavelfeldman
approved these changes
May 8, 2026
Mirrors the docker run flags used by microsoft/playwright-browsers'
tests-docker.yml so the Java and Node test environments stay in sync.
- run as pwuser (--user=pwuser --workdir /home/pwuser) instead of root
- explicit --platform linux/<arch>
- drop --ipc=host; set --shm-size=2g instead
- deliver the repo via docker cp + chown rather than a bind mount,
and move the image-baked /root/.m2 into pwuser's home so the
locally-installed SNAPSHOT artifacts resolve
- paths /root/playwright -> /home/pwuser/playwright
This is expected to fix the probabilistic chrome-headless-shell
SIGSEGV crashes observed on jammy in CI.
Mirrors the microsoft/playwright tests-docker.yml setup: the Docker workflow runs only the @smoke subset (Docker compatibility check), leaving the full suite for the regular CI matrix on native runners. Five representative test classes get a class-level @tag("smoke"), giving ~5 chromium launches when surefire is invoked with -Dgroups=smoke: - TestBrowser1 (7 tests) - TestBrowserContextBasic (22 tests) - TestPageBasic (33 tests) - TestLocatorClick (5 tests) - TestSelectorsCss (20 tests) create_project_and_run_tests.sh forwards extra args to mvn so callers can pass -Dgroups=smoke. test_docker.yml runs only the smoke subset.
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.
Summary
Aligns
test_docker.ymlwith whatmicrosoft/playwright-browsers'tests-docker.ymldoes, in two parts.1. Container launch flags
Match upstream so the Java and Node test environments stay in sync.
pwuser(--user=pwuser --workdir /home/pwuser) instead of root--ipc=host; set--shm-size=2ginstead--platform linux/<arch>(archis now a matrix dimension instead of an inline ternary)docker cp+ chown rather than a bind mount/root/.m2into pwuser's home so the SNAPSHOT artifacts populated during the Docker build still resolve2. Run only the @smoke subset
Mirrors the upstream Node setup: this Docker workflow is a Docker-compatibility check, not the full functional matrix. Five representative test classes are tagged
@Tag("smoke")and surefire is invoked with-Dgroups=smoke, giving ~5 chromium launches per matrix run.TestBrowser1,TestBrowserContextBasic,TestPageBasic,TestLocatorClick,TestSelectorsCss(~87 tests across 5 classes)tools/test-local-installation/create_project_and_run_tests.shforwards extra args tomvn, so the workflow can pass-Dgroups=smokeFull functional coverage continues on the existing native test matrix outside this workflow.
Side benefit: eliminates the jammy SIGSEGV flake
Going from ~500 chromium launches per matrix run (full suite) to ~5 (smoke only) cuts the probabilistic
chrome-headless-shellstartup-SIGSEGV crashes — observed at roughly 0.2% per launch — from ~1.5 expected per run to <0.01. The underlying chromium bug remains and is still exposed by the full Java suite elsewhere, but this workflow should no longer flake on it.Test plan
{jammy, noble} × {amd64, arm64}Test ClassLoaderruns the Spring Boot starter