Skip to content

fix(test-runner): make test.slow() extend the test timeout from any time slot - #42812

Closed
AbNoZ&v02 (Abnoz01) wants to merge 1 commit into
microsoft:mainfrom
Abnoz01:fix-42808
Closed

AbNoZ&v02 (Abnoz01) wants to merge 1 commit into
microsoft:mainfrom
Abnoz01:fix-42808

Conversation

@Abnoz01

Copy link
Copy Markdown
Contributor

Summary

  • test.slow() tripled the currently running time slot. A test.slow(callback) whose callback only uses worker fixtures runs as a beforeAll-style modifier in its own slot, so the test it ran for never got the extended timeout; the same happened for test.slow() inside a fixture with its own timeout.
  • Always extend the test's default slot, and only re-arm the running timer when the test slot is the one running.
  • Add tests for the modifier and fixture cases.

Fixes #42808

…ime slot

test.slow() tripled whichever time slot was currently running. A modifier
callback that only depends on worker fixtures runs as a beforeAll hook in
its own slot, and a fixture with its own timeout runs in its slot too, so
the test itself never got the extended timeout. Always extend the test's
default slot instead.

Fixes microsoft#42808
@Abnoz01

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/cli-json.spec.ts:220 › request and per-part commands return JSON result @mcp-windows-latest-firefox

8691 passed, 1474 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

9 flaky ⚠️ [installation tests] › playwright-cli-install-should-work.spec.ts:225 › install playwright-chromium should work `@package-installations-ubuntu-latest`
⚠️ [chromium-library] › library/video.spec.ts:521 › screencast › should capture static page in persistent context Radoslav Kirilov (@smoke) `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:436 › should produce network events, routing, and annotations for Service Worker (advanced) `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:521 › screencast › should capture static page in persistent context Radoslav Kirilov (@smoke) `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:436 › should produce network events, routing, and annotations for Service Worker (advanced) `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`

52028 passed, 1250 skipped


Merge workflow run.

@dgozman

Copy link
Copy Markdown
Collaborator

I don't think we want to make this breaking change, unless the issue becomes very popular.

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.

[Bug]: test.slow(callback) does not extend the timeout of the test it runs in when the callback only uses worker fixtures

2 participants