From 2d29cdc63ada11edbcd519d5b8249a39a703fbb7 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Fri, 7 Mar 2025 01:11:17 -0600 Subject: [PATCH] Quit VM when execute test times out A future test project will be designed such that failing to quit the VM after timing out would severely inhibit the performance of the other tests. --- test/integration/execute.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/integration/execute.js b/test/integration/execute.js index 2c758ecc..88d9e7d4 100644 --- a/test/integration/execute.js +++ b/test/integration/execute.js @@ -45,6 +45,9 @@ const whenThreadsComplete = (t, vm, uri, timeLimit = 5000) => const timeoutId = setTimeout(() => { t.fail(`Timeout waiting for threads to complete: ${uri}`); reject(new Error('time limit reached')); + + // Attempt to stop the lingering VM from interfering with other tests. + vm.quit(); }, timeLimit); // Clear the interval to allow the process to exit