diff --git a/test/async/container/.dots.rb b/test/async/container/.dots.rb index cd4bda4..f510918 100755 --- a/test/async/container/.dots.rb +++ b/test/async/container/.dots.rb @@ -14,7 +14,7 @@ def setup(container) instance.ready! # This is to avoid race conditions in the controller in test conditions. - sleep 0.1 + sleep 0.001 $stdout.write "." diff --git a/test/async/container/.graceful.rb b/test/async/container/.graceful.rb index 31e708d..87ce1dd 100755 --- a/test/async/container/.graceful.rb +++ b/test/async/container/.graceful.rb @@ -14,7 +14,7 @@ def setup(container) instance.ready! # This is to avoid race conditions in the controller in test conditions. - sleep 0.1 + sleep 0.001 clock = Async::Clock.start @@ -34,7 +34,7 @@ def setup(container) end end -controller = Graceful.new(graceful_stop: 1) +controller = Graceful.new(graceful_stop: 0.01) begin controller.run diff --git a/test/async/container/controller.rb b/test/async/container/controller.rb index faac968..d9d29e3 100644 --- a/test/async/container/controller.rb +++ b/test/async/container/controller.rb @@ -18,18 +18,18 @@ def controller.setup(container) container.spawn(key: "test") do |instance| instance.ready! - sleep(0.2) + sleep(0.02) @output.write(".") @output.flush - sleep(0.4) + sleep(0.04) end container.spawn do |instance| instance.ready! - sleep(0.3) + sleep(0.03) @output.write(",") @output.flush @@ -64,7 +64,7 @@ def controller.setup(container) it "can spawn a reactor" do def controller.setup(container) container.async do |task| - task.sleep 1 + task.sleep 0.001 end end @@ -123,7 +123,7 @@ def after(error = nil) expect(input.gets).to be == "Exiting...\n" exit_time = input.gets.to_f - expect(exit_time - graceful_shutdown_time).to be >= 1.0 + expect(exit_time - graceful_shutdown_time).to be >= 0.01 end end diff --git a/test/async/container/notify/.notify.rb b/test/async/container/notify/.notify.rb index 3fbb0c2..fee8d90 100755 --- a/test/async/container/notify/.notify.rb +++ b/test/async/container/notify/.notify.rb @@ -9,11 +9,11 @@ class MyController < Async::Container::Controller def setup(container) container.run(restart: false) do |instance| - sleep(rand) + sleep(0.001) instance.ready! - sleep(rand) + sleep(0.001) end end end