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.
This commit is contained in:
Hornwitser committed 2020-04-09 20:08:04 +02:00
1 parent 4f463a8180
commit 38c392ff6d
1 file changed
+2 -2
+2 -2
View File
@@ -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(); }
});