3 check_threaded_app_dispatch
5 t_plan
6 "ThreadTimeout Rack middleware test for $model"
7 t_begin
"configure and start" && {
10 rainbows
-D t9100.ru
-c $unicorn_config
14 t_begin
"normal request should not timeout" && {
15 test x
"HI" = x
"$(curl -sSf http://$listen/ 2>> $curl_err)"
18 t_begin
"sleepy request times out with 408" && {
20 curl
-sSf http
://$listen/2 2>> $curl_err ||
> $ok
25 t_begin
"short requests do not timeout while making a long one" && {
28 curl
-sSf http
://$listen/2 2>$curl_err >/dev
/null
&
30 for i
in $
(awk </dev
/null
'BEGIN{for(i=20;--i>=0;)print i}')
32 curl
-sSf http
://$listen/0.1 >> $ok 2>&1 &
33 test x
"HI" = x
"$(curl -sSf http://$listen/0.05)"
37 test x
"HI" = x
"$(curl -sSf http://$listen/)"
40 test 20 -eq $
(grep '^HI$' $ok |
wc -l)
41 test x
= x
"$(grep -v '^HI$' $ok)"
45 t_begin
"kill server" && {
49 t_begin
"no errors in Rainbows! stderr" && {