mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-10 20:06:33 +00:00
cancel processes soon
Windows really does not like to terminate processes, so if we try to cancel the process, we will hang in Windows.
This commit is contained in:
parent
4d020b1ded
commit
6cb2e821bb
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user