File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -82,26 +82,26 @@ module Concurrent
82
82
83
83
specify 'a #post task is never executed when the queue is at capacity' do
84
84
executed = Concurrent ::AtomicFixnum . new ( 0 )
85
- 100 . times do
85
+ 10 . times do
86
86
begin
87
- subject . post { executed . increment }
87
+ subject . post { executed . increment ; sleep ( 0.1 ) }
88
88
rescue
89
89
end
90
90
end
91
- sleep ( 0.1 )
92
- executed . value . should < 100
91
+ sleep ( 0.2 )
92
+ executed . value . should < 10
93
93
end
94
94
95
95
specify 'a #<< task is never executed when the queue is at capacity' do
96
96
executed = Concurrent ::AtomicFixnum . new ( 0 )
97
- 100 . times do
97
+ 10 . times do
98
98
begin
99
- subject << proc { executed . increment }
99
+ subject << proc { executed . increment ; sleep ( 0.1 ) }
100
100
rescue
101
101
end
102
102
end
103
- sleep ( 0.1 )
104
- executed . value . should < 100
103
+ sleep ( 0.2 )
104
+ executed . value . should < 10
105
105
end
106
106
end
107
107
You can’t perform that action at this time.
0 commit comments