backend-common: avoid starting keepalive loop in tests

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-09-17 15:02:02 +02:00
parent 3ee520091b
commit 6847cd6225
3 changed files with 9 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-common': patch
---
Avoid starting database keepalive loop in tests.
+1
View File
@@ -180,6 +180,7 @@ jsx
JWTs
Kaewkasi
Kaswell
keepalive
Keyv
Knex
Koyeb
@@ -377,7 +377,9 @@ export class DatabaseManager {
databaseClientOverrides,
deps,
);
this.startKeepaliveLoop(pluginId, client);
if (process.env.NODE_ENV !== 'test') {
this.startKeepaliveLoop(pluginId, client);
}
return client;
});