reimplement client_max_body_size handlers
[rainbows.git] / t / t9100-thread-timeout.sh
blobab46e5a755ad495c3d4f146199c0f8b9f1d253c9
1 #!/bin/sh
2 . ./test-lib.sh
3 case $model in
4 ThreadSpawn|ThreadPool|RevThreadSpawn|RevThreadPool) ;;
5 *) t_info "$0 is only compatible with Thread*"; exit 0 ;;
6 esac
8 t_plan 5 "ThreadTimeout Rack middleware test for $model"
10 t_begin "configure and start" && {
11 rtmpfiles curl_err
12 rainbows_setup
13 rainbows -D t9100.ru -c $unicorn_config
14 rainbows_wait_start
17 t_begin "normal request should not timeout" && {
18 test x"HI" = x"$(curl -sSf http://$listen/ 2>> $curl_err)"
21 t_begin "sleepy request times out with 408" && {
22 rm -f $ok
23 curl -sSf http://$listen/2 2>> $curl_err || > $ok
24 test -e $ok
25 grep 408 $curl_err
28 t_begin "kill server" && {
29 kill $rainbows_pid
32 t_begin "no errors in Rainbows! stderr" && {
33 check_stderr
36 t_done