Skip to content

Commit 57e558d

Browse files
siddhant1Copilot
andauthored
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>
1 parent c2e6d90 commit 57e558d

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
@@ -1618,9 +1618,17 @@ export const renameDomain = async (page: Page, newName: string) => {
16181618
await page.locator('#name').clear();
16191619
await page.locator('#name').fill(newName);
16201620

1621-
const patchRes = page.waitForResponse('/api/v1/domains/*');
1621+
const patchRes = page.waitForResponse(
1622+
(response) =>
1623+
response.url().includes('/api/v1/domains/') &&
1624+
response.request().method() === 'PATCH' &&
1625+
response.ok()
1626+
);
16221627
await page.getByTestId('save-button').click();
16231628
await patchRes;
1629+
await page.waitForURL((url) =>
1630+
url.pathname.includes(encodeURIComponent(newName))
1631+
);
16241632

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

0 commit comments

Comments
 (0)