Skip to content

Commit a93db37

Browse files
siddhant1Copilot
authored andcommitted
test(domains): fix flaky Rename domain with data products attached at domain and subdomain levels (#27452)
* test(domains): fix flaky "Rename domain with data products attached at domain and subdomain levels" Two races were observed in CI: 1. renameDomain reloaded the page before the browser URL had been updated to the new FQN, so the reload hit the old (now 404) URL and the app redirected to the domains list. Wait for the URL to reflect the new name before reloading. 2. The search-index reindex for data products can take longer than 30s when the parent domain is renamed under CI load. Raise the poll budget to 90s. * Revert search-index poll timeout bump, keep only URL-wait fix * Update openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> (cherry picked from commit 57e558d)
1 parent 78e5b45 commit a93db37

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • openmetadata-ui/src/main/resources/ui/playwright/utils

openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,9 +1610,17 @@ export const renameDomain = async (page: Page, newName: string) => {
16101610
await page.locator('#name').clear();
16111611
await page.locator('#name').fill(newName);
16121612

1613-
const patchRes = page.waitForResponse('/api/v1/domains/*');
1613+
const patchRes = page.waitForResponse(
1614+
(response) =>
1615+
response.url().includes('/api/v1/domains/') &&
1616+
response.request().method() === 'PATCH' &&
1617+
response.ok()
1618+
);
16141619
await page.getByTestId('save-button').click();
16151620
await patchRes;
1621+
await page.waitForURL((url) =>
1622+
url.pathname.includes(encodeURIComponent(newName))
1623+
);
16161624

16171625
const domainRes = page.waitForResponse('/api/v1/domains/name/*');
16181626
await page.reload();

0 commit comments

Comments
 (0)