From 38c392ff6dd8c62199fd2583f3e5b43c8e9922b1 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Thu, 9 Apr 2020 20:08:04 +0200 Subject: [PATCH] Fix kill logic of integration test Test if the process variable exists before trying to call kill on it, as in certain failure situations it is not set. --- test/integration/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/index.js b/test/integration/index.js index a861b09a..046e7a65 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -110,8 +110,8 @@ after(async function() { // Ensure the test processes are stopped. process.on("exit", () => { - slaveProcess.kill(); - masterProcess.kill(); + if (slaveProcess) { slaveProcess.kill(); } + if (masterProcess) { masterProcess.kill(); } });