From 405eb370b36c58f957a8c144f36d750212ca7fa4 Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Tue, 4 Feb 2025 14:17:43 +1100 Subject: [PATCH] cancel processes soon Windows really does not like to terminate processes, so if we try to cancel the process, we will hang in Windows. --- tests/integration/testmanager.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/testmanager.nim b/tests/integration/testmanager.nim index 99a8779b..cab03ecc 100644 --- a/tests/integration/testmanager.nim +++ b/tests/integration/testmanager.nim @@ -440,7 +440,8 @@ proc start(test: IntegrationTest) {.async: (raises: []).} = if not test.process.isNil and not test.process.finished: # cancel the process future, but the process itself may still be # running if the procedure was cancelled or the test timed out - await test.process.cancelAndWait() + test.process.cancelSoon() + trace "process future will cancel soon" await test.teardown(hardhat) @@ -594,7 +595,8 @@ proc stop*(manager: TestManager) {.async: (raises: [CancelledError]).} = for test in manager.tests: if not test.process.isNil and not test.process.finished: - await test.process.cancelAndWait() + # windows does not like cancelling processes, so waiting is not an option + test.process.cancelSoon() for hardhat in manager.hardhats: try: