From 1b8b4826cb0aef4d09dae32cd4d60a1f4630e42c Mon Sep 17 00:00:00 2001 From: Vladimir Lazar <106525396+cbr7@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:38:03 +0200 Subject: [PATCH] chore(test): fix race condition from windows platform (#2254) Signed-off-by: Vladimir Lazar --- tests/playwright/src/ai-lab-extension.spec.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/playwright/src/ai-lab-extension.spec.ts b/tests/playwright/src/ai-lab-extension.spec.ts index 385331607..65de008cc 100644 --- a/tests/playwright/src/ai-lab-extension.spec.ts +++ b/tests/playwright/src/ai-lab-extension.spec.ts @@ -187,9 +187,13 @@ test.describe.serial(`AI Lab extension installation and verification`, { tag: '@ test(`Make GET request to the model service for ${modelName}`, async ({ request }) => { const port = await modelServiceDetailsPage.getInferenceServerPort(); const url = `http://localhost:${port}`; - const response = await request.get(url); - playExpect(response.ok()).toBeTruthy(); - playExpect(await response.text()).toContain('hello'); + + // eslint-disable-next-line sonarjs/no-nested-functions + await playExpect(async () => { + const response = await request.get(url); + playExpect(response.ok()).toBeTruthy(); + playExpect(await response.text()).toContain('hello'); + }).toPass({ timeout: 30_000 }); }); test(`Delete model service for ${modelName}`, async () => {