Check if test control exists before closing it

Fix after action in integration test throwing in certain error cases.
This commit is contained in:
Hornwitser committed 2021-05-21 17:30:06 +02:00
1 parent 177278fee3
commit 4a8a4c8227
1 file changed
+3 -1
+3 -1
View File
@@ -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.