diff --git a/integration/scripts/httpServer.ts b/integration/scripts/httpServer.ts index 7bcd8fb3abf..eb3121bba8b 100644 --- a/integration/scripts/httpServer.ts +++ b/integration/scripts/httpServer.ts @@ -38,7 +38,7 @@ const serveFromTempDir = async (config: HttpServerConfig): Promise<{ pid: number stderr: fs.openSync(stderrFilePath, 'a'), }); - await waitForServer(serverUrl, { log: console.log, maxAttempts: Infinity }); + await waitForServer(serverUrl, { log: console.log, maxAttempts: 60 }); console.log(`${config.name} is being served from`, serverUrl); return { pid: proc.pid, serverUrl }; diff --git a/integration/tests/global.setup.ts b/integration/tests/global.setup.ts index 377477b4979..c12ebf4d761 100644 --- a/integration/tests/global.setup.ts +++ b/integration/tests/global.setup.ts @@ -5,19 +5,22 @@ import { appConfigs } from '../presets'; import { fs, parseEnvOptions, startClerkJsHttpServer, startClerkUiHttpServer } from '../scripts'; setup('start long running apps', async () => { - setup.setTimeout(90_000); + setup.setTimeout(240_000); await fs.ensureDir(constants.TMP_DIR); - await startClerkJsHttpServer(); - await startClerkUiHttpServer(); + const httpServerStart = Date.now(); + await Promise.all([startClerkJsHttpServer(), startClerkUiHttpServer()]); + console.log(`HTTP servers started in ${Date.now() - httpServerStart}ms`); const { appIds } = parseEnvOptions(); if (appIds.length) { const apps = appConfigs.longRunningApps.getByPattern(appIds); // state cannot be shared using playwright, // so we save the state in a file using a strategy similar to `storageState` + const appStart = Date.now(); await Promise.all(apps.map(app => app.init())); + console.log(`Apps initialized in ${Date.now() - appStart}ms`); } else { // start a single app using the available env variables }