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" && {
22 printf 'GET /%s/1 HTTP/1.1\r\n' $pfx
23 printf 'Host: example.com\r\n\r\n'
24 printf 'GET /%s/2 HTTP/1.1\r\n' $pfx
25 printf 'Host: example.com\r\n\r\n'
26 printf 'GET /%s/3 HTTP/1.1\r\n' $pfx
27 printf 'Host: example.com\r\n'
28 printf 'Connection: close\r\n\r\n'
31 ) | socat
- TCP4
:$listen > $fifo
32 test xok
= x$
(cat $ok)
37 t_begin
'reloading Rainbows! to ensure writeout' && {
38 # ensure worker is loaded before HUP
39 rm -f $curl_err $curl_out
40 curl
-vs http
://$listen/ >$curl_out 2> $curl_err
41 # reload to ensure everything is flushed
42 kill -HUP $rainbows_pid
43 test xSTART
= x
"$(cat $fifo)"
49 t_begin
"check body close messages" && {
51 /^path_info=\/'$pfx'\/[1-3]$/ { next }
53 END { exit(NR == 3 ? 0 : 1) }
60 t_begin
"make keepalive requests to trigger $pfx response body" && {
62 rm -f $curl_err $curl_out
63 curl
-vsSf http
://$listen/$pfx/[1-3] 2> $curl_err > $curl_out
91 t_begin
"enable sendfile gem" && {
92 echo "require 'sendfile'" >> $unicorn_config
105 t_begin
"killing succeeds" && {
109 t_begin
"check stderr" && {