From ef2d01794a3fcba293126c3c5a42a1ec239b8b0c Mon Sep 17 00:00:00 2001 From: Matthew Lieder Date: Thu, 29 Dec 2022 09:49:05 -0600 Subject: [PATCH] fix: tests still say Running after test run finishes --- src/pure/ApiProcess.ts | 5 +++-- src/watch.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pure/ApiProcess.ts b/src/pure/ApiProcess.ts index 0f938446..d44ed52e 100644 --- a/src/pure/ApiProcess.ts +++ b/src/pure/ApiProcess.ts @@ -119,8 +119,9 @@ export class ApiProcess { this.vitestState = buildWatchClient({ port, handlers: this.handlers, - reconnectInterval: 100, - reconnectTries: 10, + // vitest could take up to 10 seconds to start up on some computers, so reconnects need to be long enough to handle that + reconnectInterval: 500, + reconnectTries: 20, }) this.vitestState.loadingPromise.then((isRunning) => { diff --git a/src/watch.ts b/src/watch.ts index 12f77bcb..aca04a3a 100644 --- a/src/watch.ts +++ b/src/watch.ts @@ -139,8 +139,9 @@ export class TestWatcher extends Disposable { } }, }, - reconnectInterval: 200, - reconnectTries: 10, + // vitest could take up to 10 seconds to start up on some computers, so reconnects need to be long enough to handle that + reconnectInterval: 500, + reconnectTries: 20, }) effect(() => {