@@ -205,6 +205,9 @@ final class TestModuleUtil(
205
205
val claimFolder = base / " claim"
206
206
os.makeDir.all(claimFolder)
207
207
208
+ // Make sure we can claim at least one test class to start before we spawn the
209
+ // subprocess, because creating JVM subprocesses are expensive and we don't want
210
+ // to spawn one if there is nothing for it to do
208
211
val startingTestClass = os
209
212
.list
210
213
.stream(testClassQueueFolder)
@@ -213,13 +216,13 @@ final class TestModuleUtil(
213
216
214
217
if (force || startingTestClass.nonEmpty) {
215
218
startingTestClass.foreach(logger.ticker(_))
216
- // queue .log file will be appended by the runner with the stolen test class's name
219
+ // claim .log file will be appended by the runner with the stolen test class's name
217
220
// it can be used to check the order of test classes of the runner
218
- val claimLog = claimFolder / os.up / s " ${claimFolder.last} .log "
221
+ val claimLog = claimFolder / " ../claim .log"
219
222
os.write.over(claimLog, Array .empty[Byte ])
220
223
workerStatusMap.put(claimLog, logger.ticker)
221
224
// test runner will log success/failure test class counter here while running
222
- val resultPath = base / s " result.log "
225
+ val resultPath = base / " result.log"
223
226
os.write.over(resultPath, upickle.default.write((0L , 0L )))
224
227
workerResultSet.put(resultPath, ())
225
228
0 commit comments