Skip to content

Commit 2d29cdc

Browse files
committed
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.
1 parent 709d155 commit 2d29cdc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/integration/execute.js

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ const whenThreadsComplete = (t, vm, uri, timeLimit = 5000) =>
4545
const timeoutId = setTimeout(() => {
4646
t.fail(`Timeout waiting for threads to complete: ${uri}`);
4747
reject(new Error('time limit reached'));
48+
49+
// Attempt to stop the lingering VM from interfering with other tests.
50+
vm.quit();
4851
}, timeLimit);
4952

5053
// Clear the interval to allow the process to exit

0 commit comments

Comments
 (0)