diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-04-12 22:43:10 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-04-12 22:44:55 -0700 |
commit | cf838bfb5faed96fb41b8ae30d591fc7b7853d38 (patch) | |
tree | 23a4791ff50ad9d8ec97b94e574b6b481d421df0 | |
parent | ac44225fb21e0dbc3a716cec3ea3133a0b2435a0 (diff) | |
download | unicorn-cf838bfb5faed96fb41b8ae30d591fc7b7853d38.tar.gz |
We need to ensure children are spawned by waiting until the master is ready.
-rw-r--r-- | test/exec/test_exec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb index ec00fac..67a189c 100644 --- a/test/exec/test_exec.rb +++ b/test/exec/test_exec.rb @@ -587,6 +587,7 @@ end end wait_master_ready(log.path) + File.truncate(log.path, 0) wait_for_file(pid_file) orig_pid = pid = File.read(pid_file).to_i orig_fds = `ls -l /proc/#{pid}/fd`.split(/\n/) @@ -600,6 +601,8 @@ end end wait_for_death(pid) + wait_master_ready(log.path) + File.truncate(log.path, 0) wait_for_file(pid_file) pid = File.read(pid_file).to_i assert_not_equal orig_pid, pid @@ -607,7 +610,7 @@ end assert $?.success? # we could've inherited descriptors the first time around - assert expect_size >= curr_fds.size + assert expect_size >= curr_fds.size, curr_fds.inspect expect_size = curr_fds.size assert_nothing_raised do @@ -617,11 +620,13 @@ end end wait_for_death(pid) + wait_master_ready(log.path) + File.truncate(log.path, 0) wait_for_file(pid_file) pid = File.read(pid_file).to_i curr_fds = `ls -l /proc/#{pid}/fd`.split(/\n/) assert $?.success? - assert_equal expect_size, curr_fds.size + assert_equal expect_size, curr_fds.size, curr_fds.inspect Process.kill(:QUIT, pid) wait_for_death(pid) |