test(ui): remove compound test.slow() multipliers in playwright tests#28052
Conversation
test.slow() triples the test timeout each time it's evaluated. When called inside both a hook (beforeAll / afterAll / beforeEach) and an individual test() within the same scope, the multipliers compound to 9x or 27x the default timeout, masking flakiness and bloating CI runs. Remove the redundant hook-level calls from: - e2e/VersionPages/EntityVersionPages.spec.ts (beforeAll + afterAll) - e2e/VersionPages/ServiceEntityVersionPage.spec.ts (beforeAll + afterAll) - e2e/Features/CustomizeDetailPage.spec.ts (afterAll) - e2e/Pages/EntityDataConsumer.spec.ts (afterAll) - e2e/Pages/EntityDataSteward.spec.ts (afterAll) Test-level test.slow() calls (where genuinely needed) are preserved.
Code Review ✅ ApprovedRemoves redundant hook-level test.slow() calls to eliminate compounded timeout multipliers in Playwright tests. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
There was a problem hiding this comment.
Pull request overview
This PR updates Playwright E2E specs to remove redundant hook-level test.slow() calls that can compound with other timeout modifiers, making effective per-test timeouts much larger (and less obvious) than intended.
Changes:
- Removed
test.slow()frombeforeAll/afterAllhooks in version-page specs. - Removed
test.slow()fromafterAllcleanup hooks in a few page/feature specs to avoid compounding timeouts.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ServiceEntityVersionPage.spec.ts | Removes hook-level test.slow() from setup/cleanup. |
| openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts | Removes hook-level test.slow() from setup/cleanup. |
| openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.ts | Removes test.slow() from afterAll cleanup. |
| openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/EntityDataConsumer.spec.ts | Removes test.slow() from afterAll cleanup. |
| openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/EntityDataSteward.spec.ts | Removes test.slow() from afterAll cleanup. |
| test.describe('Service Version pages', () => { | ||
| test.beforeAll('Setup pre-requests', async ({ browser }) => { | ||
| test.slow(); | ||
|
|
||
| const { apiContext, afterAction } = await performAdminLogin(browser); | ||
| await adminUser.create(apiContext); | ||
| await adminUser.setAdminRole(apiContext); |
| test.describe('Entity Version pages', () => { | ||
| test.beforeAll('Setup pre-requests', async ({ browser }) => { | ||
| test.slow(); | ||
|
|
||
| adminUser = new UserClass(); | ||
| entities = entityClasses.map((EntityClass) => new EntityClass()); | ||
|
|
|
🟡 Playwright Results — all passed (19 flaky)✅ 4066 passed · ❌ 0 failed · 🟡 19 flaky · ⏭️ 86 skipped
🟡 19 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |



Summary
Removes redundant hook-level
test.slow()calls that compound with test-level calls within the same scope.test.slow()triples the test timeout each time it's evaluated. When placed inside both a hook (beforeAll/afterAll/beforeEach) and an individualtest()body, the multipliers compound — abeforeEach+ test gives 9× the default timeout, and three layers (e.g.beforeAll+afterAll+ test) push it toward 27×. That masks real flakiness, makes CI slower than necessary, and makes per-test timeouts non-obvious for new contributors.Changes
e2e/VersionPages/EntityVersionPages.spec.tsbeforeAll+afterAlle2e/VersionPages/ServiceEntityVersionPage.spec.tsbeforeAll+afterAlle2e/Features/CustomizeDetailPage.spec.tsafterAlle2e/Pages/EntityDataConsumer.spec.tsafterAlle2e/Pages/EntityDataSteward.spec.tsafterAllTest-level
test.slow()calls (where genuinely needed) are preserved.Fix pattern
Tracked in https://github.com/open-metadata/openmetadata-collate/issues/4059, which also covers parallel Collate-side fixes and follow-up cleanup for
waitForTimeout/ oversizedtest.setTimeout.Test plan
yarn playwright:run <file>)