From e5c11eee13a0bbdb84262ad9c39f9ddba3ac68cc Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 22 Apr 2026 20:27:30 +0200 Subject: [PATCH] fix bad assert for reconnect --- playwright/sfu-reconnect-bug.spec.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/playwright/sfu-reconnect-bug.spec.ts b/playwright/sfu-reconnect-bug.spec.ts index 046f623d..78e89fe6 100644 --- a/playwright/sfu-reconnect-bug.spec.ts +++ b/playwright/sfu-reconnect-bug.spec.ts @@ -94,11 +94,7 @@ test("When creator left, avoid reconnect to the same SFU", async ({ // https://github.com/element-hq/element-call/issues/3344 // The app used to request a new jwt token then to reconnect to the SFU expect(wsConnectionCount).toBe(1); - await expect - .poll(() => wsConnectionCount, { - message: - "Expected only 1 WebSocket connection (no reconnection after creator left)", - timeout: 5000, // Check for 5 seconds that it stays at 1 - }) - .toBe(1); + // Wait a bit to be sure that if there was a reconnect, it would have happened by now + await guestCPage.waitForTimeout(6000); + expect(wsConnectionCount).toBe(1); });