44 resolveLocalVitestEnv ,
55 resolveLocalFullSuiteProfile ,
66 resolveLocalVitestScheduling ,
7- shouldUseLargeLocalFullSuiteProfile ,
87} from "../../scripts/lib/vitest-local-scheduling.mjs" ;
98
109describe ( "vitest local full-suite profile" , ( ) => {
@@ -33,7 +32,7 @@ describe("vitest local full-suite profile", () => {
3332 } ) ;
3433 } ) ;
3534
36- it ( "selects the large local profile on roomy hosts that are not throttled " , ( ) => {
35+ it ( "spends the host worker budget once across full-suite shards " , ( ) => {
3736 const env = { } ;
3837 const hostInfo = {
3938 cpuCount : 14 ,
@@ -46,38 +45,35 @@ describe("vitest local full-suite profile", () => {
4645 fileParallelism : true ,
4746 throttledBySystem : false ,
4847 } ) ;
49- expect ( shouldUseLargeLocalFullSuiteProfile ( env , hostInfo ) ) . toBe ( true ) ;
5048 expect ( resolveLocalFullSuiteProfile ( env , hostInfo ) ) . toEqual ( {
51- shardParallelism : 10 ,
52- vitestMaxWorkers : 2 ,
49+ shardParallelism : 6 ,
50+ vitestMaxWorkers : 1 ,
5351 } ) ;
5452 } ) ;
5553
56- it ( "keeps the smaller local profile when the host is already throttled" , ( ) => {
54+ it ( "reduces full-suite shard concurrency when the host is already throttled" , ( ) => {
5755 const hostInfo = {
5856 cpuCount : 14 ,
5957 loadAverage1m : 14 ,
6058 totalMemoryBytes : 48 * 1024 ** 3 ,
6159 freeMemoryBytes : 32 * 1024 ** 3 ,
6260 } ;
6361
64- expect ( shouldUseLargeLocalFullSuiteProfile ( { } , hostInfo ) ) . toBe ( false ) ;
6562 expect ( resolveLocalFullSuiteProfile ( { } , hostInfo ) ) . toEqual ( {
66- shardParallelism : 4 ,
63+ shardParallelism : 1 ,
6764 vitestMaxWorkers : 1 ,
6865 } ) ;
6966 } ) ;
7067
71- it ( "never selects the large local profile in CI " , ( ) => {
68+ it ( "caps full-suite process fanout on the largest hosts " , ( ) => {
7269 const hostInfo = {
73- cpuCount : 14 ,
70+ cpuCount : 64 ,
7471 loadAverage1m : 0 ,
75- totalMemoryBytes : 48 * 1024 ** 3 ,
72+ totalMemoryBytes : 512 * 1024 ** 3 ,
7673 } ;
7774
78- expect ( shouldUseLargeLocalFullSuiteProfile ( { CI : "true" } , hostInfo ) ) . toBe ( false ) ;
79- expect ( resolveLocalFullSuiteProfile ( { CI : "true" } , hostInfo ) ) . toEqual ( {
80- shardParallelism : 4 ,
75+ expect ( resolveLocalFullSuiteProfile ( { } , hostInfo ) ) . toEqual ( {
76+ shardParallelism : 10 ,
8177 vitestMaxWorkers : 1 ,
8278 } ) ;
8379 } ) ;
0 commit comments