Skip to content

Commit

Permalink
chore(test): increase Pod deletion timeout in Kubernetes PVC test (po…
Browse files Browse the repository at this point in the history
…dman-desktop#9364)

fix: increase pod deletion timeout
Signed-off-by: Anton Misskii <[email protected]>
  • Loading branch information
amisskii authored Oct 14, 2024
1 parent 093409e commit 024e9fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/playwright/src/specs/kubernetes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ test.describe('Kubernetes resources End-to-End test', () => {
.toEqual(KubernetesResourceState.Running);
});
test('Delete the PVC resource', async ({ page, navigationBar }) => {
await deletePod(page, POD_NAME);
test.setTimeout(80_000);
await deletePod(page, POD_NAME, 80_000);
const kubernetesBar = await navigationBar.openKubernetes();
const pvcsPage = await kubernetesBar.openTabPage(KubernetesResources.PVCs);
await pvcsPage.deleteKubernetesResource(PVC_NAME);
Expand Down
4 changes: 2 additions & 2 deletions tests/playwright/src/utility/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export async function deleteRegistry(page: Page, name: string, failIfNotExist =
});
}

export async function deletePod(page: Page, name: string): Promise<void> {
export async function deletePod(page: Page, name: string, timeout: number = 50_000): Promise<void> {
await test.step(`Delete pod ${name}`, async () => {
const navigationBar = new NavigationBar(page);
const pods = await navigationBar.openPods();
Expand All @@ -148,7 +148,7 @@ export async function deletePod(page: Page, name: string): Promise<void> {
async () => {
return !!(await pods.getPodRowByName(name));
},
{ timeout: 50_000 },
{ timeout: timeout },
);
} catch (error) {
if (!(error as Error).message.includes('Page is empty')) {
Expand Down

0 comments on commit 024e9fd

Please sign in to comment.