File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 182182
183183 context 'overflow policy' do
184184
185- before do
185+ before ( :each ) do
186186 @queue = Queue . new
187187 end
188188
189+ after ( :each ) do
190+ subject . kill
191+ end
192+
189193 # On abort, it should raise an error
190194 it "raises an error when overflow on abort" do
191195 latch = Concurrent ::CountDownLatch . new ( 5 )
200204 latch . count_down
201205 end
202206 end
203- subject . shutdown
204207 latch . wait ( 1 )
205208 } . to raise_error
206209 end
218221 latch . count_down
219222 end
220223 end
221- subject . shutdown
222224 latch . wait ( 1 )
223225
224226 @queue . length . should be < 5
227229 # To check for caller_runs, we'll check how many unique threads
228230 # actually ran the block
229231
230- it 'uses the calling thread for overflow under caller_runs' , :brittle do
232+ it 'uses the calling thread for overflow under caller_runs' do
231233 latch = Concurrent ::CountDownLatch . new ( 5 )
232234 mutex = Mutex . new
233235
240242 latch . count_down
241243 end
242244 end
243- subject . shutdown
244245 latch . wait ( 1 )
245246
246247 # Turn the queue into an array
You can’t perform that action at this time.
0 commit comments