Commit 69985326 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'caalberts-fix-parallel-rspec-runner' into 'master'

Fix parallel_rspec_runner not to run all tests

See merge request gitlab-org/gitlab!48733
parents 73a0449c 0ba51628
......@@ -43,6 +43,16 @@ RSpec.describe Tooling::ParallelRSpecRunner do # rubocop:disable RSpec/FilePath
subject.run
end
context 'when there is no intersect between allocated tests and filtered tests' do
let(:filter_tests) { '99_spec.rb' }
it 'does not run rspec' do
expect(subject).not_to receive(:exec)
subject.run
end
end
end
context 'with empty filter tests file' do
......
......@@ -38,6 +38,11 @@ module Tooling
Knapsack.logger.info tests_to_run
Knapsack.logger.info
if tests_to_run.empty?
Knapsack.logger.info 'No tests to run on this node, exiting.'
return
end
exec(*rspec_command)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment