Skip to content

Commit

Permalink
chore: Fix e2e timeout for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Nov 23, 2021
1 parent 0363fc7 commit 66d183b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions e2e-common/test-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
Expand Down

0 comments on commit 66d183b

Please sign in to comment.