3 t_plan
6 "keepalive_timeout 0 tests for $model"
5 t_begin
"setup and start" && {
6 rainbows_setup
$model 2 0
7 grep 'keepalive_timeout 0' $unicorn_config
8 rainbows
-D env.ru
-c $unicorn_config
12 t_begin
'check server responds with Connection: close' && {
13 curl
-sSfi http
://$listen/ |
grep 'Connection: close'
16 t_begin
"send keepalive response that does not expect close" && {
17 req
='GET / HTTP/1.1\r\nHost: example.com\r\n\r\n'
24 ) | socat
- TCP
:$listen > $fifo
26 elapsed
=$
(( $now - $t0 ))
27 t_info
"elapsed=$elapsed (expecting <=3)"
31 t_begin
"'Connection: close' header set" && {
32 grep 'Connection: close' $tmp
35 t_begin
"killing succeeds" && {
39 t_begin
"check stderr" && {