From 199accea659eee094d424b8549cf3d360ac46458 Mon Sep 17 00:00:00 2001 From: Kai Rohwer Date: Thu, 30 Nov 2023 22:24:54 +0100 Subject: [PATCH] Test sequentiell aborts --- .../process/deployment/deployment.e2e.test.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/engine/e2e_tests/process/deployment/deployment.e2e.test.js b/src/engine/e2e_tests/process/deployment/deployment.e2e.test.js index 6da9713ce..cc12fb795 100644 --- a/src/engine/e2e_tests/process/deployment/deployment.e2e.test.js +++ b/src/engine/e2e_tests/process/deployment/deployment.e2e.test.js @@ -8,12 +8,16 @@ jest.setTimeout(100000); function killEngineProcess(engineProcess) { return new Promise((resolve) => { + const i = Math.random(); engineProcess.on('exit', () => { + console.log('engineProcess killed', i); resolve(); }); engineProcess.on('error', () => { + console.log('engineProcess error', i); resolve(); }); + console.log('engineProcess kill command', i); engineProcess.kill(); }); } @@ -77,11 +81,9 @@ describe('Test deploying a process', () => { afterAll(async () => { // kills all processes and their subprocesses - const killCommands = engineProcesses.map((engineProcess) => - killEngineProcess(engineProcess.process), - ); - - await Promise.all(killCommands); + for (engineProcess of engineProcesses) { + await killEngineProcess(engineProcess.process); + } }); beforeEach(() => {