Skip to content

test(ui): remove compound test.slow() multipliers in playwright tests#28052

Merged
ShaileshParmar11 merged 1 commit into
mainfrom
fix/playwright-test-slow-multipliers
May 12, 2026
Merged

test(ui): remove compound test.slow() multipliers in playwright tests#28052
ShaileshParmar11 merged 1 commit into
mainfrom
fix/playwright-test-slow-multipliers

Conversation

@ShaileshParmar11
Copy link
Copy Markdown
Contributor

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 individual test() body, the multipliers compound — a beforeEach + test gives 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

File Removed 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.

Fix pattern

// compound (9× timeout) — what we removed
test.beforeAll(async () => { test.slow(); /* setup */ });
test('foo', async () => { test.slow(); /* body */ });

// kept — slow only where genuinely needed
test.beforeAll(async () => { /* setup */ });
test('foo', async () => { test.slow(); /* body */ });

Tracked in https://github.com/open-metadata/openmetadata-collate/issues/4059, which also covers parallel Collate-side fixes and follow-up cleanup for waitForTimeout / oversized test.setTimeout.

Test plan

  • Verify each modified spec still passes locally (yarn playwright:run <file>)
  • CI green

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.
Copilot AI review requested due to automatic review settings May 12, 2026 05:45
@ShaileshParmar11 ShaileshParmar11 requested a review from a team as a code owner May 12, 2026 05:45
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels May 12, 2026
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 12, 2026

Code Review ✅ Approved

Removes redundant hook-level test.slow() calls to eliminate compounded timeout multipliers in Playwright tests. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() from beforeAll/afterAll hooks in version-page specs.
  • Removed test.slow() from afterAll cleanup 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.

Comment on lines 65 to 69
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);
Comment on lines 72 to 76
test.describe('Entity Version pages', () => {
test.beforeAll('Setup pre-requests', async ({ browser }) => {
test.slow();

adminUser = new UserClass();
entities = entityClasses.map((EntityClass) => new EntityClass());

@github-actions
Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.44% (64638/103507) 43.08% (35117/81513) 45.92% (10345/22528)

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

🟡 Playwright Results — all passed (19 flaky)

✅ 4066 passed · ❌ 0 failed · 🟡 19 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 762 0 6 8
🟡 Shard 3 777 0 4 7
🟡 Shard 4 788 0 2 18
🟡 Shard 5 708 0 1 41
🟡 Shard 6 733 0 5 8
🟡 19 flaky test(s) (passed on retry)
  • Features/DataAssetRulesDisabled.spec.ts › Verify the Drive Service entity item action after rules disabled (shard 1, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/KnowledgeCenter.spec.ts › Article mentions in description should working for Knowledge Center (shard 2, 1 retry)
  • Features/KnowledgeCenterTextEditor.spec.ts › Rich Text Editor - Text Formatting (shard 2, 1 retry)
  • Features/KnowledgeCenterTextEditor.spec.ts › Rich Text Editor - Text Formatting (shard 2, 1 retry)
  • Features/KnowledgeCenterTextEditor.spec.ts › Rich Text Editor - Text Formatting (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/Workflows/WorkflowOssRestrictions.spec.ts › add-event-filter-button is enabled in OSS (shard 3, 1 retry)
  • Flow/ObservabilityAlerts.spec.ts › Table alert (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Database Schema (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Domain Rbac (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 6, 1 retry)
  • Pages/InputOutputPorts.spec.ts › Remove single output port (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/Lineage/PlatformLineage.spec.ts › Verify domain platform view (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@ShaileshParmar11 ShaileshParmar11 merged commit c099724 into main May 12, 2026
59 of 61 checks passed
@ShaileshParmar11 ShaileshParmar11 deleted the fix/playwright-test-slow-multipliers branch May 12, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants