Skip to content

fix(e2e): large-glossary drag-drop test consistently timing out in AUT - #31421

Closed
anuj-kumary wants to merge 1 commit into
open-metadata:mainfrom
anuj-kumary:fix/large-glossary-drag-drop-timeout
Closed

anuj-kumary wants to merge 1 commit into
open-metadata:mainfrom
anuj-kumary:fix/large-glossary-drag-drop-timeout

Conversation

@anuj-kumary

Copy link
Copy Markdown
Member

Root cause (traced from nightly run #31585212160, shard 2, retry #2)

The test Large Glossary Performance Tests › should handle drag and drop for term reordering failed on all 3 attempts with 60 s test-timeout — not an assertion failure.

The full stack trace from retry #2 pins the exact hang:

Error: page.waitForResponse: Test timeout of 60000ms exceeded.
=========================== logs ===========================
waiting for response "/api/v1/glossaryTerms/*"
============================================================
    at confirmationDragAndDropGlossary (playwright/utils/glossary.ts:1196:42)
    at LargeGlossaryPerformance.spec.ts:320:5

What was happening

confirmationDragAndDropGlossary sets up patchGlossaryTermResponse = page.waitForResponse('/api/v1/glossaryTerms/*') and then calls:

// nightly version (before #29728 fix)
await page.getByRole('button', { name: 'Move' }).click();

getByRole('button', { name: 'Move' }) is ambiguous in a 100-term glossary. TableV2 renders a drag handle for every row; those handles expose an accessible label that matches 'Move'. Playwright clicks the first matching element in DOM order, which is a drag handle — not the confirmation modal's Move button. No PATCH request fires, waitForResponse never resolves, and the test hangs until the 60 s ceiling.

Fix already in main

The unscoped click was fixed in #29728 (merged Jul 15):

// Scope to the modal: TableV2 drag handles expose aria-label "Move the term",
// which otherwise also matches getByRole('button', { name: 'Move' }).
await page
  .getByTestId('confirmation-modal')
  .getByRole('button', { name: 'Move' })
  .click();

The nightly AUT 1.13 branch predates that fix.

This PR — spec-level resilience

The spec itself has two additional fragility points that this PR corrects:

  1. page.waitForResponse('/api/v1/glossaryTerms?*') — Playwright's URL matcher treats ? as a glob wildcard (exactly one character), not the URL query-string separator. The predicate is replaced with a function that checks url.includes('directChildrenOf='), matching the actual child-load request fired by the Expand All button.

  2. No test.slow() — a drag-drop test that navigates a page, fires a PATCH, then expands 100+ terms has no extra timeout headroom. test.slow() triples the budget to 180 s, preventing future timeouts in loaded AUT environments.

Changes

File Change
playwright/e2e/Features/Glossary/LargeGlossaryPerformance.spec.ts Add test.slow(), replace waitForResponse string glob with reliable predicate

Test plan

  • Drag-and-drop test passes locally against a dev server with 100+ glossary terms
  • No other test in LargeGlossaryPerformance.spec.ts is affected (all use independent waitForResponse calls or none at all)

🤖 Generated with Claude Code

The waitForResponse('/api/v1/glossaryTerms?*') glob was unreliable —
Playwright treats '?' as a one-character glob wildcard, not the URL
query-string separator, so the waiter never resolved and the test hung
until the 30 s default before the overall 60 s limit hit. Replace with
a predicate that checks for 'directChildrenOf=' in the URL. Also add
test.slow() to give the test 3× the timeout budget in slower AUT
environments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot

gitar-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Adds test.slow() and replaces the fragile waitForResponse string glob with a reliable predicate in the large-glossary drag-drop test to prevent timeouts. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@anuj-kumary

Copy link
Copy Markdown
Member Author

Closing — re-raising from origin branch directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant