From 4a8a4c8227b1b5d2d2a7bccdb3403fe7344ef698 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Fri, 21 May 2021 17:30:06 +0200 Subject: [PATCH] Check if test control exists before closing it Fix after action in integration test throwing in certain error cases. --- test/integration/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/integration/index.js b/test/integration/index.js index 3383142c..38823452 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -194,7 +194,9 @@ after(async function() { masterProcess.kill("SIGINT"); await events.once(masterProcess, "exit"); } - await control.connector.close(); + if (control) { + await control.connector.close(); + } }); // Ensure the test processes are stopped.