From 70168a20fa1e7adbae17052931252a949cb28045 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 17 Jan 2023 16:07:26 +0000 Subject: [PATCH] Prevent killing tests when stopping the server --- packages/server/src/app.ts | 2 +- packages/server/src/environment.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 177393dee7..50a1e187ba 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -74,7 +74,7 @@ server.on("close", async () => { await events.shutdown() await Thread.shutdown() api.shutdown() - if (!env.isTest()) { + if (!env.isTest() && !env.isDockerisedTest()) { process.exit(errCode) } }) diff --git a/packages/server/src/environment.ts b/packages/server/src/environment.ts index d11661ce27..99949feb41 100644 --- a/packages/server/src/environment.ts +++ b/packages/server/src/environment.ts @@ -115,6 +115,7 @@ const environment = { isInThread: () => { return inThread }, + isDockerisedTest, } // threading can cause memory issues with node-ts in development