From fea4acbb895d6199c9b2ede12aa6f6af1752e836 Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:54:00 +1100 Subject: [PATCH] fix nodeprocess not exiting --- tests/integration/nodeprocess.nim | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/integration/nodeprocess.nim b/tests/integration/nodeprocess.nim index d5200a2f..690a957a 100644 --- a/tests/integration/nodeprocess.nim +++ b/tests/integration/nodeprocess.nim @@ -128,14 +128,7 @@ method stop*(node: NodeProcess, expectedErrCode: int = -1) {.base, async.} = error "failed to terminate process", errCode = $errCode trace "waiting for node process to exit" - var backoff = 8 - while node.process.running().valueOr false: - backoff = min(backoff*2, 1024) # Exponential backoff - await sleepAsync(backoff) - - let exitCode = node.process.peekExitCode().valueOr: - fatal "could not get exit code from process", error - return + let exitCode = await node.process.waitForExit(3.seconds) if exitCode > 0 and exitCode != 143 and # 143 = SIGTERM (initiated above)