File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,14 @@ import { defineConfig } from 'vitest/config';
88 */
99const TIMEOUT_MS = process . env . CI ? 240_000 : 120_000 ;
1010
11+ /**
12+ * On relatively modest machines in CI when weval is enabled,
13+ * tests that use it (i.e. any test that does a build w/ enableAot) can
14+ * suffer from CPU resource contention.
15+ */
16+ const MAX_CONCURRENT_SUITES =
17+ process . env . CI && process . env . WEVAL_TEST ? 1 : undefined ;
18+
1119const REPORTERS = process . env . GITHUB_ACTIONS
1220 ? [ 'verbose' , 'github-actions' ]
1321 : [ 'verbose' ] ;
@@ -29,6 +37,16 @@ export default defineConfig({
2937 retry : RETRY ,
3038 printConsoleTrace : true ,
3139 passWithNoTests : false ,
40+ /**
41+ * We use only one concurrent suite because tools like Weval
42+ * are very sensitive to other operations, and during tests
43+ * we will blow through timeouts and performance
44+ *
45+ * Inside individual suites, test.concurrent will still enable tests
46+ * to be run side-by-side (see TIMEOUT_MS and RETRY which enable
47+ * those tests to eventually pass despite increased load).
48+ */
49+ maxConcurrentSuites : MAX_CONCURRENT_SUITES ,
3250 include : [ 'test/**/*.js' ] ,
3351 setupFiles : [ 'test/meta-resolve-stub.ts' ] ,
3452 exclude : [
You can’t perform that action at this time.
0 commit comments