From 66d183b86a05cf9cf36dd74478d8b93b90c2e2a9 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Tue, 23 Nov 2021 16:11:11 +0100 Subject: [PATCH] chore: Fix e2e timeout for debug --- e2e-common/test-config.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/e2e-common/test-config.ts b/e2e-common/test-config.ts index 0adb64e55d..588728e210 100644 --- a/e2e-common/test-config.ts +++ b/e2e-common/test-config.ts @@ -34,15 +34,6 @@ registerInitializer('postgres', new PostgresInitializer()); registerInitializer('mysql', new MysqlInitializer()); registerInitializer('mariadb', new MysqlInitializer()); -/** - * For local debugging of the e2e tests, we set a very long timeout value otherwise tests will - * automatically fail for going over the 5 second default timeout. - */ -if (process.env.E2E_DEBUG) { - // tslint:disable-next-line:no-console - console.log('E2E_DEBUG', process.env.E2E_DEBUG, ' - setting long timeout'); - jest.setTimeout(1800 * 1000); -} /** * Increase default timeout in CI because occasionally valid tests fail due to * timeouts. @@ -53,6 +44,16 @@ if (process.env.CI) { jest.setTimeout(15 * 1000); } +/** + * For local debugging of the e2e tests, we set a very long timeout value otherwise tests will + * automatically fail for going over the 5 second default timeout. + */ +if (process.env.E2E_DEBUG) { + // tslint:disable-next-line:no-console + console.log('E2E_DEBUG', process.env.E2E_DEBUG, ' - setting long timeout'); + jest.setTimeout(1800 * 1000); +} + export const testConfig = () => { const portsFile = path.join(__dirname, 'ports.json'); fs.ensureFileSync(portsFile);