Skip to content

Commit 3fae73e

Browse files
authored
fix(pool): don't teardown the communication channel too soon if something is running after the test (#8767)
1 parent 8100063 commit 3fae73e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/vitest/src/runtime/worker.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,9 @@ async function execute(method: 'run' | 'collect', ctx: ContextRPC, worker: Vites
6565
await worker[methodName](state)
6666
}
6767
finally {
68-
await Promise.all(cleanups.map(fn => fn()))
69-
7068
await rpcDone().catch(() => {})
69+
await Promise.all(cleanups.map(fn => fn())).catch(() => {})
7170
await environmentLoader?.close()
72-
rpc.$close()
7371
}
7472
}
7573

0 commit comments

Comments
 (0)