diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-24 12:20:58 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-24 12:20:58 -0700 |
commit | 2f8ed953decce975307a6c5b39330af816e184bc (patch) | |
tree | 07a56b46cf6aae765915d48cc1116c6ec20e7fee /t/t9000-rack-app-pool.sh | |
parent | bd8912c86fc3ef617e72e4cf59fb308dc06563ba (diff) | |
download | rainbows-2f8ed953decce975307a6c5b39330af816e184bc.tar.gz |
Instead of sleeping and waiting for a PID file to appear, just use a named-pipe and block on it in the test scripts since we know Unicorn won't attempt to fork until sockets are already bound.
Diffstat (limited to 't/t9000-rack-app-pool.sh')
-rwxr-xr-x | t/t9000-rack-app-pool.sh | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/t/t9000-rack-app-pool.sh b/t/t9000-rack-app-pool.sh index 5530b9d..6c82ff8 100755 --- a/t/t9000-rack-app-pool.sh +++ b/t/t9000-rack-app-pool.sh @@ -1,25 +1,12 @@ #!/bin/sh . ./test-lib.sh -eval $(unused_listen) -rtmpfiles unicorn_config pid r_err r_out curl_out curl_err - nr_client=30 - -cat > $unicorn_config <<EOF -listen "$listen" -pid "$pid" -stderr_path "$r_err" -stdout_path "$r_out" -Rainbows! do - use :ThreadSpawn - worker_connections 50 -end -EOF - +rtmpfiles curl_out curl_err +rainbows_setup ThreadSpawn 50 APP_POOL_SIZE=4 APP_POOL_SIZE=$APP_POOL_SIZE rainbows -D t9000.ru -c $unicorn_config -wait_for_pid $pid +rainbows_wait_start start=$(date +%s) for i in $(awk "BEGIN{for(i=0;i<$nr_client;++i) print i}" </dev/null) |