From 55070052de44b1661af2e85516e08a4df473093d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 9 Aug 2009 18:44:10 -0700 Subject: test_exec: wait for worker readiness Otherwise Ruby could get confused and not be able to reap the process correctly (and thus wait a long time for timeout). --- test/exec/test_exec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb index 014b270..cf7ef28 100644 --- a/test/exec/test_exec.rb +++ b/test/exec/test_exec.rb @@ -77,6 +77,7 @@ end File.open("config.ru", "wb") { |fp| fp.syswrite(HI) } pid = xfork { redirect_test_io { exec($unicorn_bin, "-l#@addr:#@port") } } wait_master_ready("test_stderr.#{pid}.log") + wait_workers_ready("test_stderr.#{pid}.log", 1) status = nil assert_nothing_raised do Process.kill(sig, pid) @@ -626,6 +627,7 @@ end end wait_master_ready(log.path) + wait_workers_ready(log.path, 1) File.truncate(log.path, 0) wait_for_file(pid_file) orig_pid = pid = File.read(pid_file).to_i @@ -641,6 +643,7 @@ end wait_for_death(pid) wait_master_ready(log.path) + wait_workers_ready(log.path, 1) File.truncate(log.path, 0) wait_for_file(pid_file) pid = File.read(pid_file).to_i @@ -660,6 +663,7 @@ end wait_for_death(pid) wait_master_ready(log.path) + wait_workers_ready(log.path, 1) File.truncate(log.path, 0) wait_for_file(pid_file) pid = File.read(pid_file).to_i -- cgit v1.2.3-24-ge0c7