Skip to content

Commit

Permalink
Fix shard guard logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bootstraponline authored and jan-goral committed Feb 24, 2020
1 parent fbc2db2 commit 316d248
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test_runner/src/main/kotlin/ftl/shard/Shard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ object Shard {
testcases.sortByDescending { it.time }

testcases.forEach { testMethod ->
val shard = shards.first()
// num_shards must be > 1, and <= 50
val shard = shards.first { it.testMethods.size + args.testTargetsAlwaysRun.size < 50 }

shard.testMethods.add(testMethod)
shard.time += testMethod.time
Expand Down

0 comments on commit 316d248

Please sign in to comment.