Skip to content

Commit

Permalink
DEV: rebalance parallel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pmusaraj committed Mar 19, 2019
1 parent b084750 commit c8e1d3c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/tasks/docker.rake
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ task 'docker:test' do
subset = parts[0].to_i - 1

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))
end

params << spec_partials[subset].join(' ')

puts "Running spec subset #{subset + 1} of #{total}"
Expand Down

0 comments on commit c8e1d3c

Please sign in to comment.