فهرست منبع

chore: Fix e2e timeout for debug

Michael Bromley 4 سال پیش
والد
کامیت
66d183b86a
1فایلهای تغییر یافته به همراه10 افزوده شده و 9 حذف شده
  1. 10 9
      e2e-common/test-config.ts

+ 10 - 9
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);