class Knapsack::Distributors::LeftoverDistributor
Public Instance Methods
leftover_tests()
click to toggle source
# File lib/knapsack/distributors/leftover_distributor.rb, line 8 def leftover_tests @leftover_tests ||= all_tests - report_tests end
report_tests()
click to toggle source
# File lib/knapsack/distributors/leftover_distributor.rb, line 4 def report_tests @report_tests ||= report.keys end
Private Instance Methods
default_node_tests()
click to toggle source
# File lib/knapsack/distributors/leftover_distributor.rb, line 29 def default_node_tests @node_tests = [] ci_node_total.times do |index| @node_tests[index] = [] end end
post_assign_test_files_to_node()
click to toggle source
# File lib/knapsack/distributors/leftover_distributor.rb, line 14 def post_assign_test_files_to_node node_index = 0 leftover_tests.each do |test_file| node_tests[node_index] << test_file node_index += 1 node_index %= ci_node_total end end
post_tests_for_node(node_index)
click to toggle source
# File lib/knapsack/distributors/leftover_distributor.rb, line 23 def post_tests_for_node(node_index) test_files = node_tests[node_index] return unless test_files test_files end