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.
This commit is contained in:
1 parent
709d155be8
commit
2d29cdc63a
1 file changed
+3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user