@@ -125,9 +125,9 @@ module Concurrent
125125 describe 'with children' do
126126
127127 let ( :root ) { Promise . new ( executor : executor ) { sleep ( 0.1 ) ; nil } }
128- let ( :c1 ) { root . then { nil } }
129- let ( :c2 ) { root . then { nil } }
130- let ( :c2_1 ) { c2 . then { nil } }
128+ let ( :c1 ) { root . then { sleep ( 0.1 ) ; nil } }
129+ let ( :c2 ) { root . then { sleep ( 0.1 ) ; nil } }
130+ let ( :c2_1 ) { c2 . then { sleep ( 0.1 ) ; nil } }
131131
132132 context 'when called on the root' do
133133 it 'should set all promises to :pending' do
@@ -142,7 +142,6 @@ module Concurrent
142142
143143 context 'when called on a child' do
144144 it 'should set all promises to :pending' do
145- pending ( 'intermittently failing' )
146145 c2_1 . execute
147146
148147 [ root , c1 , c2 , c2_1 ] . each { |p | p . should be_pending }
@@ -336,8 +335,7 @@ module Concurrent
336335 end
337336
338337 it 'uses reason as rejection reason when a promise has no rescue callable' do
339- pending ( 'intermittently failing' )
340- p = Promise . new ( executor : executor ) { raise ArgumentError } . then { |val | val } . execute
338+ p = Promise . new ( executor : ImmediateExecutor . new ) { raise ArgumentError } . then { |val | val } . execute
341339 sleep ( 0.1 )
342340 p . should be_rejected
343341 p . reason . should be_a ArgumentError
0 commit comments