3 skip_models StreamResponseEpoll
5 t_plan
29 "keepalive does not clear Rack env prematurely for $model"
7 t_begin
"setup and start" && {
9 rtmpfiles curl_out curl_err
10 echo "preload_app true" >> $unicorn_config
11 rainbows
-D close-has-env.ru
-c $unicorn_config
17 t_begin
"make pipelined requests to trigger $pfx response body" && {
21 printf 'GET /%s/1 HTTP/1.1\r\n' $pfx
22 printf 'Host: example.com\r\n\r\n'
23 printf 'GET /%s/2 HTTP/1.1\r\n' $pfx
24 printf 'Host: example.com\r\n\r\n'
25 printf 'GET /%s/3 HTTP/1.1\r\n' $pfx
26 printf 'Host: example.com\r\n'
27 printf 'Connection: close\r\n\r\n'
30 ) | socat
- TCP4
:$listen > $fifo
31 test xok
= x$
(cat $ok)
36 t_begin
'reloading Rainbows! to ensure writeout' && {
37 # ensure worker is loaded before HUP
38 curl
-s http
://$listen/ >/dev
/null
39 # reload to ensure everything is flushed
40 kill -HUP $rainbows_pid
41 test xSTART
= x
"$(cat $fifo)"
47 t_begin
"check body close messages" && {
49 /^path_info=\/'$pfx'\/[1-3]$/ { next }
51 END { exit(NR == 3 ? 0 : 1) }
58 t_begin
"make keepalive requests to trigger $pfx response body" && {
60 rm -f $curl_err $curl_out
61 curl
-vsSf http
://$listen/$pfx/[1-3] 2> $curl_err > $curl_out
89 t_begin
"enable sendfile gem" && {
90 echo "require 'sendfile'" >> $unicorn_config
103 t_begin
"killing succeeds" && {
107 t_begin
"check stderr" && {