Skip to content

Commit d9391d3

Browse files
committed
Relax timing.
1 parent 9f316b9 commit d9391d3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fixtures/async/container/a_container.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,16 @@ module Container
178178
end
179179

180180
with "health_check_timeout:" do
181-
let(:container) {subject.new(health_check_interval: 0.01)}
181+
let(:container) {subject.new(health_check_interval: 1.0)}
182182

183183
it "should not terminate a child process if it updates its state within the specified time" do
184184
# We use #run here to hit the Hybrid container code path:
185-
container.run(count: 1, health_check_timeout: 0.02) do |instance|
185+
container.run(count: 1, health_check_timeout: 1.0) do |instance|
186186
instance.ready!
187187

188188
10.times do
189189
instance.ready!
190-
sleep(0.01)
190+
sleep(0.5)
191191
end
192192
end
193193

@@ -197,11 +197,11 @@ module Container
197197
end
198198

199199
it "can terminate a child process if it does not update its state within the specified time" do
200-
container.spawn(health_check_timeout: 0.01) do |instance|
200+
container.spawn(health_check_timeout: 1.0) do |instance|
201201
instance.ready!
202202

203203
# This should trigger the health check - since restart is false, the process will be terminated:
204-
sleep(1)
204+
sleep(2.0)
205205
end
206206

207207
container.wait

0 commit comments

Comments
 (0)