Skip to content

Commit

Permalink
Remove first_is_1 check
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydorsey committed Apr 1, 2024
1 parent 5ed8475 commit fa326ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/parallel_tests/cli.rb
Expand Up @@ -82,8 +82,7 @@ def run_tests_in_parallel(num_processes, options)

report_number_of_tests(groups) unless options[:quiet]
test_results = execute_in_parallel(groups, groups.size, options) do |group, index|
test_env_number = options[:first_is_1] ? index + 1 : index
run_tests(group, test_env_number, num_processes, options)
run_tests(group, index, num_processes, options)
end
report_results(test_results, options) unless options[:quiet]
end
Expand Down
4 changes: 2 additions & 2 deletions spec/parallel_tests/cli_spec.rb
Expand Up @@ -394,9 +394,9 @@ def self.it_prints_nothing_about_rerun_commands(options)

it "calls run_tests with --first-is-1" do
options = common_options.merge(count: processes, first_is_1: true)
expect(subject).to receive(:run_tests).once.with(['foo'], 0, processes, options).and_return(results)
expect(subject).to receive(:run_tests).once.with(['foo'], 1, processes, options).and_return(results)
expect(subject).to receive(:run_tests).once.with(['foo'], 2, processes, options).and_return(results)
expect(subject).to receive(:run_tests).once.with(['bar'], 3, processes, options).and_return(results)
expect(subject).to receive(:run_tests).once.with(['bar'], 2, processes, options).and_return(results)
subject.run(['test', '-n', processes.to_s, '--first-is-1', '--allow-duplicates', '-t', 'my_test_runner'])
end
end
Expand Down

0 comments on commit fa326ef

Please sign in to comment.