DEV: rebalance parallel tests (take 2)

DEV: rebalance parallel tests (take 2)

diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rake
index ad6b0f0..45ef9b5 100644
--- a/lib/tasks/docker.rake
+++ b/lib/tasks/docker.rake
@@ -135,9 +135,8 @@ task 'docker:test' do
 
             spec_partials = Dir["spec/**/*_spec.rb"].sort.in_groups(total, false)
             # quick and dirty load balancing
-            spec_partials.each_index do |i|
-              next if i == 0
-              spec_partials[i - 1].concat(spec_partials[i].shift(15))
+            if (spec_partials.count > 3)
+              spec_partials[0].concat(spec_partials[total - 1].shift(60))
             end
 
             params << spec_partials[subset].join(' ')

GitHub sha: 60b6c67c

1 Like

You don’t need the parenthesis in Ruby :wink:

if spec_partials.count > 3
2 Likes