From 6e1cc2f464da652dbe04dc80abcdb14db9b18b83 Mon Sep 17 00:00:00 2001 From: Julien Eluard Date: Mon, 22 Jan 2024 14:38:51 +0100 Subject: [PATCH] fix: handle prover stratup failure --- packages/prover/test/e2e/cli/cmds/start.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/prover/test/e2e/cli/cmds/start.test.ts b/packages/prover/test/e2e/cli/cmds/start.test.ts index da0c9dceb405..d797e6e33185 100644 --- a/packages/prover/test/e2e/cli/cmds/start.test.ts +++ b/packages/prover/test/e2e/cli/cmds/start.test.ts @@ -43,7 +43,7 @@ describe("prover/start", () => { }); describe("when started", () => { - let proc: childProcess.ChildProcess; + let proc: childProcess.ChildProcess | null = null; const paramsFilePath = path.join("/tmp", "e2e-test-env", "params.json"); const web3: Web3 = new Web3(proxyUrl); @@ -73,8 +73,11 @@ describe("prover/start", () => { await sleep(3000); }, 50000); + afterAll(async () => { - await stopChildProcess(proc); + if (proc) { + await stopChildProcess(proc); + } }); it("should respond to verified calls", async () => {