diff --git a/cli/api/commands/base_worker.ts b/cli/api/commands/base_worker.ts index e2be64b38..2584f722e 100644 --- a/cli/api/commands/base_worker.ts +++ b/cli/api/commands/base_worker.ts @@ -29,7 +29,11 @@ export abstract class BaseWorker { const timeout = setTimeout(() => { terminate(() => - reject(new Error(`Compilation timed out after ${timeoutMillis / 1000} seconds`)) + reject(new Error( + `Compilation timed out after ${timeoutMillis / 1000} seconds. ` + + `To allow more time, re-run with a longer --timeout ` + + `(e.g. --timeout=2m, --timeout=1h).` + )) ); }, timeoutMillis); diff --git a/cli/api/utils/constants.ts b/cli/api/utils/constants.ts index c4049a9df..f7a82675f 100644 --- a/cli/api/utils/constants.ts +++ b/cli/api/utils/constants.ts @@ -1 +1 @@ -export const DEFAULT_COMPILATION_TIMEOUT_MILLIS = 30000; +export const DEFAULT_COMPILATION_TIMEOUT_MILLIS = 60000; diff --git a/tests/api/projects.spec.ts b/tests/api/projects.spec.ts index 7bff903d7..c26debef2 100644 --- a/tests/api/projects.spec.ts +++ b/tests/api/projects.spec.ts @@ -700,7 +700,10 @@ suite("examples", () => { }); fail("Compilation timeout Error expected."); } catch (e) { - expect(e.message).to.equal("Compilation timed out after 1 seconds"); + expect(e.message).to.equal( + "Compilation timed out after 1 seconds. To allow more time, " + + "re-run with a longer --timeout (e.g. --timeout=2m, --timeout=1h)." + ); } });