File tree Expand file tree Collapse file tree 4 files changed +7
-8
lines changed
Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ module Concurrent
44
55 describe CachedThreadPool do
66
7- let ( :latch ) { Concurrent ::CountDownLatch . new }
8-
97 subject do
108 described_class . new ( fallback_policy : :discard )
119 end
@@ -17,6 +15,8 @@ module Concurrent
1715
1816 it_should_behave_like :thread_pool
1917
18+ let ( :latch ) { Concurrent ::CountDownLatch . new }
19+
2020 context '#initialize' do
2121
2222 it 'sets :max_length to DEFAULT_MAX_POOL_SIZE' do
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ module Concurrent
44
55 describe FixedThreadPool do
66
7- let ( :latch ) { Concurrent ::CountDownLatch . new }
8-
97 let! ( :num_threads ) { 5 }
108 subject { described_class . new ( num_threads ) }
119
@@ -16,6 +14,8 @@ module Concurrent
1614
1715 it_should_behave_like :thread_pool
1816
17+ let ( :latch ) { Concurrent ::CountDownLatch . new }
18+
1919 context '#initialize default values' do
2020
2121 subject { described_class . new ( 5 ) }
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ module Concurrent
44
55 describe RubyThreadPoolExecutor , :type => :mrirbx do
66
7- let ( :latch ) { Concurrent ::CountDownLatch . new }
8-
97 after ( :each ) do
108 subject . kill
119 subject . wait_for_termination ( 0.1 )
@@ -28,6 +26,7 @@ module Concurrent
2826 context '#remaining_capacity' do
2927
3028 let! ( :expected_max ) { 100 }
29+ let ( :latch ) { Concurrent ::CountDownLatch . new }
3130
3231 subject do
3332 RubyThreadPoolExecutor . new (
Original file line number Diff line number Diff line change 22
33shared_examples :thread_pool do
44
5- let ( :latch ) { Concurrent ::CountDownLatch . new }
6-
75 after ( :each ) do
86 subject . kill
97 subject . wait_for_termination ( 0.1 )
108 end
119
1210 it_should_behave_like :executor_service
1311
12+ let ( :latch ) { Concurrent ::CountDownLatch . new }
13+
1414 context '#auto_terminate?' do
1515
1616 it 'returns true by default' do
You can’t perform that action at this time.
0 commit comments