3 nr_client
=30 APP_POOL_SIZE
=4
5 t_plan
6 "AppPool Rack middleware test"
7 t_begin
"configure and start" && {
8 rtmpfiles curl_out curl_err
9 rainbows_setup ThreadSpawn
50
10 APP_POOL_SIZE
=$APP_POOL_SIZE rainbows
-D t9000.ru
-c $unicorn_config
14 t_begin
"launch $nr_client requests" && {
16 seq="$(awk "BEGIN
{for(i
=0;i
<$nr_client;++i
) print i
}" </dev/null)"
19 curl
-sSf http
://$listen/ >> $curl_out 2>> $curl_err &
22 t_info elapsed
=$
(( $
(date +%s
) - $start ))
25 t_begin
"kill server" && {
29 t_begin
"$APP_POOL_SIZE instances of app were used" && {
30 test $APP_POOL_SIZE -eq $
(sort < $curl_out |
uniq |
wc -l)
33 t_begin
"no errors in curl stderr" && {
37 t_begin
"no errors in Rainbows! stderr" && {