@@ -99,22 +99,22 @@ def connect(*args)
9999 mount "TestComponent"
100100 evaluate_ruby "Hyperstack.go_ahead_and_connect"
101101 Timecop . travel ( Time . now +Hyperstack ::Connection . transport . expire_new_connection_in )
102- wait_for { Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
102+ wait_for { sleep 0.25 ; Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
103103 end
104104
105105 it "will not keep the temporary polled connection open" do
106106 mount "TestComponent"
107107 Hyperstack ::Connection . active . should =~ [ 'ScopeIt::TestApplication' ]
108108 Timecop . travel ( Time . now +Hyperstack ::Connection . transport . expire_new_connection_in )
109- wait_for { Hyperstack ::Connection . active } . to eq ( [ ] )
109+ wait_for { sleep 0.25 ; Hyperstack ::Connection . active } . to eq ( [ ] )
110110 sleep 1
111111 end
112112
113113 it "sees the connection going offline" do
114114 mount "TestComponent"
115115 evaluate_ruby "Hyperstack.go_ahead_and_connect"
116116 Timecop . travel ( Time . now +Hyperstack ::Connection . transport . expire_new_connection_in )
117- wait_for { sleep 1 ; Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
117+ wait_for { sleep 0.25 ; Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
118118 ApplicationController . acting_user = true
119119 mount "TestComponent"
120120 evaluate_ruby "Hyperstack.go_ahead_and_connect"
@@ -169,21 +169,21 @@ def connect(*args)
169169 mount "TestComponent"
170170 evaluate_ruby "Hyperstack.go_ahead_and_connect"
171171 Timecop . travel ( Time . now +Hyperstack ::Connection . transport . expire_new_connection_in )
172- wait_for { Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
172+ wait_for { sleep 0.25 ; Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
173173 end
174174
175175 it "will not keep the temporary polled connection open" do
176176 mount "TestComponent"
177177 Hyperstack ::Connection . active . should =~ [ 'ScopeIt::TestApplication' ]
178178 Timecop . travel ( Time . now +Hyperstack ::Connection . transport . expire_new_connection_in )
179- wait_for { Hyperstack ::Connection . active } . to eq ( [ ] )
179+ wait_for { sleep 0.25 ; Hyperstack ::Connection . active } . to eq ( [ ] )
180180 end
181181
182182 it "sees the connection going offline" do
183183 mount "TestComponent"
184184 evaluate_ruby "Hyperstack.go_ahead_and_connect"
185185 Timecop . travel ( Time . now +Hyperstack ::Connection . transport . expire_new_connection_in )
186- wait_for { Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
186+ wait_for { sleep 0.25 ; Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
187187 ApplicationController . acting_user = true
188188 mount "TestComponent"
189189 evaluate_ruby "Hyperstack.go_ahead_and_connect"
@@ -240,27 +240,27 @@ def connect(*args)
240240 mount "TestComponent"
241241 evaluate_ruby "Hyperstack.go_ahead_and_connect"
242242 Timecop . travel ( Time . now +Hyperstack ::Connection . transport . expire_new_connection_in )
243- wait_for { Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
243+ wait_for { sleep 0.25 ; Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
244244 end
245245
246246 it "will not keep the temporary polled connection open" do
247247 mount "TestComponent"
248248 Hyperstack ::Connection . active . should =~ [ 'ScopeIt::TestApplication' ]
249249 Timecop . travel ( Time . now +Hyperstack ::Connection . transport . expire_new_connection_in )
250- wait_for { Hyperstack ::Connection . active } . to eq ( [ ] )
250+ wait_for { sleep 0.25 ; Hyperstack ::Connection . active } . to eq ( [ ] )
251251 end
252252
253253 it "sees the connection going offline" , skip : 'this keeps failing intermittently, but not due to functional issues' do
254254 mount "TestComponent"
255255 evaluate_ruby "Hyperstack.go_ahead_and_connect"
256256 Timecop . travel ( Time . now +Hyperstack ::Connection . transport . expire_new_connection_in )
257- wait_for { Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
257+ wait_for { sleep 0.25 ; Hyperstack ::Connection . active } . to eq ( [ 'ScopeIt::TestApplication' ] )
258258 ApplicationController . acting_user = true
259259 sleep 1 # needed so Pusher can catch up since its not controlled by timecop
260260 mount "TestComponent"
261261 evaluate_ruby "Hyperstack.go_ahead_and_connect"
262262 Timecop . travel ( Time . now +Hyperstack ::Connection . transport . refresh_channels_every )
263- wait_for { Hyperstack ::Connection . active } . to eq ( [ ] )
263+ wait_for { sleep 0.25 ; Hyperstack ::Connection . active } . to eq ( [ ] )
264264 end
265265
266266 it "receives change notifications" do
0 commit comments