diff --git a/packages/backend/src/managers/playground.spec.ts b/packages/backend/src/managers/playground.spec.ts index 5c21e7484..e61007150 100644 --- a/packages/backend/src/managers/playground.spec.ts +++ b/packages/backend/src/managers/playground.spec.ts @@ -69,9 +69,7 @@ beforeEach(() => { {} as PodmanConnection, ); originalFetch = globalThis.fetch; - globalThis.fetch = vi.fn().mockResolvedValue({ - ok: true, - }); + globalThis.fetch = vi.fn().mockResolvedValue({}); }); afterEach(() => { diff --git a/packages/backend/src/managers/playground.ts b/packages/backend/src/managers/playground.ts index 8ce433f4e..5f637b76a 100644 --- a/packages/backend/src/managers/playground.ts +++ b/packages/backend/src/managers/playground.ts @@ -215,11 +215,10 @@ export class PlayGroundManager { this.playgrounds.get(modelId).status === 'starting' ) { try { - const response = await fetch(`http://localhost:${freePort}`); - contacted = response.ok; - await timeout(1000); + await fetch(`http://localhost:${freePort}`); + contacted = true; } catch (err: unknown) { - /* empty */ + await timeout(1000); } }