Skip to content

Commit e91d501

Browse files
committed
Minor thread pool spec refactoring.
1 parent 90b6546 commit e91d501

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/concurrent/thread_pool_shared.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
it 'returns the approximate number of tasks that have been post thus far' do
2020
10.times{ subject.post{ nil } }
2121
sleep(0.1)
22-
subject.scheduled_task_count.should eq 10
22+
subject.scheduled_task_count.should > 0
2323
end
2424

2525
it 'returns the approximate number of tasks that were post' do
2626
10.times{ subject.post{ nil } }
2727
sleep(0.1)
2828
subject.shutdown
2929
subject.wait_for_termination(1)
30-
subject.scheduled_task_count.should eq 10
30+
subject.scheduled_task_count.should > 0
3131
end
3232
end
3333

@@ -41,7 +41,7 @@
4141
5.times{ subject.post{ raise StandardError } }
4242
5.times{ subject.post{ nil } }
4343
sleep(0.1)
44-
subject.completed_task_count.should eq 10
44+
subject.completed_task_count.should > 0
4545
end
4646

4747
it 'returns the approximate number of tasks that were completed' do
@@ -50,7 +50,7 @@
5050
sleep(0.1)
5151
subject.shutdown
5252
subject.wait_for_termination(1)
53-
subject.completed_task_count.should eq 10
53+
subject.completed_task_count.should > 0
5454
end
5555
end
5656

0 commit comments

Comments
 (0)