diff --git a/server/src/database/index.js b/server/src/database/index.js index 92fb1ab..655f0eb 100644 --- a/server/src/database/index.js +++ b/server/src/database/index.js @@ -152,7 +152,8 @@ export async function getTestHar(id) { export async function testConnection(retries = 3, delay = 5000) { const test = 'SELECT 1 FROM sitespeed_io_test_runs'; try { - const result = await DatabaseHelper.getInstance().query(test); + const databaseHelper = DatabaseHelper.getInstance(); + const result = await databaseHelper.query(test); return result.rows[0]; } catch (error) { logError('Could not get a connection to the database', error);