diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-24 10:23:11 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-24 10:25:37 -0700 |
commit | ccd4681cdd361f00b86d29e9d1b1ccae0e7d5079 (patch) | |
tree | e298df563e509244992e5dba80eb3583607b90e8 | |
parent | 4047b1a09d07ba9d66ca8d5f36aa4ebcbfe83a62 (diff) | |
download | rainbows-ccd4681cdd361f00b86d29e9d1b1ccae0e7d5079.tar.gz |
Ensure our workers are capable of processing requests before we can continue to setup signal handlers. The later "kill -USR1" signal may fire in our test script before the workers have a chance to setup the handlers. So by the time we receive a positive response, we _know_ signal handlers are ready.
-rw-r--r-- | t/lib-reopen-logs.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/t/lib-reopen-logs.sh b/t/lib-reopen-logs.sh index 813f204..352a789 100644 --- a/t/lib-reopen-logs.sh +++ b/t/lib-reopen-logs.sh @@ -18,6 +18,9 @@ EOF rainbows -D sleep.ru -c $unicorn_config wait_for_pid $pid +# ensure our server is started and responding before signaling +curl -sSf http://$listen/ >/dev/null + start=$(date +%s) for i in $(awk "BEGIN{for(i=0;i<$nr_client;++i) print i}" </dev/null) do |