From 2069689780fa7046d91190650381846d25cf52f0 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sat, 6 Mar 2021 18:32:53 +0100 Subject: [PATCH] Remove --exit flag from tests When setting up the tests there were issues with code that didn't properly clean up after itself and left lingering connections, intervals or timers that kept the event loop running after the tests where done. To fix this the --exit flag was passed as a temporary measure but then subsequently forgotten about. The issues with keeping the event loop alive have long since been fixed on Linux, but on Windows there was a problem with the control connector not exiting because the master server was killed instead of shutten down properly. With that issue fixed there are no longer any connections or timers keeping the event loop alive and --exit can thus be removed. --- package.json | 2 +- test/integration/index.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f7669f6a..fadd435c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "root", "private": true, "scripts": { - "test": "mocha --exit --check-leaks -R spec --recursive test plugins/global_chat/test plugins/research_sync/test plugins/statistics_exporter/test plugins/subspace_storage/test", + "test": "mocha --check-leaks -R spec --recursive test plugins/global_chat/test plugins/research_sync/test plugins/statistics_exporter/test plugins/subspace_storage/test", "fast-test": "FAST_TEST=y npm test", "cover": "nyc npm test", "fast-cover": "FAST_TEST=y nyc npm test", diff --git a/test/integration/index.js b/test/integration/index.js index 59051a18..f3ab1e76 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -175,6 +175,7 @@ after(async function() { masterProcess.kill("SIGINT"); await events.once(masterProcess, "exit"); } + await control.connector.close(); }); // Ensure the test processes are stopped.