Skip to content

Commit

Permalink
fix: revert @dgolovin proposal as it causes other issues
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff MAURY <[email protected]>
  • Loading branch information
jeffmaury committed Feb 5, 2024
1 parent b2ce138 commit add99b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions packages/backend/src/managers/playground.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ beforeEach(() => {
{} as PodmanConnection,
);
originalFetch = globalThis.fetch;
globalThis.fetch = vi.fn().mockResolvedValue({
ok: true,
});
globalThis.fetch = vi.fn().mockResolvedValue({});
});

afterEach(() => {
Expand Down
7 changes: 3 additions & 4 deletions packages/backend/src/managers/playground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit add99b5

Please sign in to comment.