Skip to content

test: start a new fixture server when a test class is rerun - #1985

Merged
Yury Semikhatsky (yury-s) merged 1 commit into
microsoft:mainfrom
yury-s:fix-fixture-server-rerun
Sep 14, 2026
Merged

Yury Semikhatsky (yury-s) merged 1 commit into
microsoft:mainfrom
yury-s:fix-fixture-server-rerun

Conversation

@yury-s

Copy link
Copy Markdown
Member

Summary

  • ServerLifecycle stopped the server in afterAll but kept it in serverMap, so surefire reruns (PW_MAX_RETRIES) reused the stopped server and failed with net::ERR_CONNECTION_REFUSED (e.g. TestBrowserContextClearCookies on webkit in chore: mark 1.63.0 #1983). Remove it from the map on stop.
  • Use ConcurrentHashMap since test classes run in parallel.

ServerLifecycle stopped the server in afterAll but kept it in serverMap,
so surefire reruns (PW_MAX_RETRIES) got the stopped server and failed
with net::ERR_CONNECTION_REFUSED instead of retrying the test. Also make
the map concurrent since test classes run in parallel.
@yury-s
Yury Semikhatsky (yury-s) merged commit f4eacb0 into microsoft:main Sep 14, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants