Today runOrder=balanced looks only at threadCount (set by parallel or -DthreadCount) when it sorts the test classes. If you use forkCount>1 but not parallel=classes, then threadCount is 1. In that case balanced only puts the slowest classes first. It does not use the number of forks that run the tests.
I would like balanced to also use forkCount. The number of parallel test runners is forkCount × threadCount. So balanced should split the classes over that many runners. Then balanced also helps when you use forkCount>1 without parallel=classes.
Idea for the code: send forkCount to the provider with a new forkcount property (the same way threadcount is sent today), and use threadCount × forkCount as the number of buckets in DefaultRunOrderCalculator.
Today
runOrder=balancedlooks only atthreadCount(set byparallelor-DthreadCount) when it sorts the test classes. If you useforkCount>1but notparallel=classes, thenthreadCountis1. In that casebalancedonly puts the slowest classes first. It does not use the number of forks that run the tests.I would like
balancedto also useforkCount. The number of parallel test runners isforkCount × threadCount. Sobalancedshould split the classes over that many runners. Thenbalancedalso helps when you useforkCount>1withoutparallel=classes.Idea for the code: send
forkCountto the provider with a newforkcountproperty (the same waythreadcountis sent today), and usethreadCount × forkCountas the number of buckets inDefaultRunOrderCalculator.