4 Coolio|CoolioThreadSpawn|CoolioThreadPool|EventMachine
) ;;
5 Epoll|XEpoll|XEpollThreadPool|XEpollThreadSpawn
) ;;
7 t_info
"$0 not supported for $model"
12 t_plan
7 "keepalive clients disconnected on SIGQUIT for $model"
14 t_begin
"setup and start" && {
15 rainbows_setup
$model 50 30
16 rainbows
-E none
-D env.ru
-c $unicorn_config
20 t_begin
"start a keepalive request" && {
23 printf 'GET / HTTP/1.1\r\nHost: example.com\r\n\r\n'
25 ) | socat
- TCP4
:$listen > $fifo &
28 t_begin
"wait for response" && {
29 while ! tail -1 < $tmp |
grep '}$' >/dev
/null
35 t_begin
"stop Rainbows! gracefully" && {
37 kill -QUIT $rainbows_pid
40 t_begin
"keepalive client disconnected quickly" && {
42 diff=$
(( $
(unix_time
) - $t0 ))
43 test $diff -le 2 || die
"client diff=$diff > 2"
46 t_begin
"wait for termination" && {
47 while kill -0 $rainbows_pid
51 diff=$
(( $
(unix_time
) - $t0 ))
52 test $diff -le 4 || die
"server diff=$diff > 4"
55 t_begin
"check stderr" && {