Skip to content

Commit c8ee4b5

Browse files
committed
Fixed broken tests.
1 parent 2d9d9b4 commit c8ee4b5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spec/concurrent/configuration_spec.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ module Concurrent
2828
end
2929

3030
specify '#terminate_pools! acts on all executors with auto_terminate: true' do
31-
expect(Concurrent.global_fast_executor).to receive(:kill).once.with(no_args).and_call_original
32-
expect(Concurrent.global_io_executor).to receive(:kill).once.with(no_args).and_call_original
33-
expect(Concurrent.global_timer_set).to receive(:kill).once.with(no_args).and_call_original
31+
# The 'at_least(:once)' clauses account for global config reset
32+
expect(Concurrent.global_fast_executor).to receive(:kill).at_least(:once).with(no_args).and_call_original
33+
expect(Concurrent.global_io_executor).to receive(:kill).at_least(:once).with(no_args).and_call_original
34+
expect(Concurrent.global_timer_set).to receive(:kill).at_least(:once).with(no_args).and_call_original
3435
Concurrent.terminate_pools!
3536
end
3637
end

0 commit comments

Comments
 (0)