2 CONFIG_RU
=${CONFIG_RU-'async-response.ru'}
5 skip_models Base WriterThreadPool WriterThreadSpawn
6 skip_models StreamResponseEpoll
8 t_plan
6 "async HTTP/1.0 response for $model"
10 t_begin
"setup and start" && {
12 rtmpfiles a b c a_err b_err c_err
13 # can't load Rack::Lint here since it'll cause Rev to slurp
14 rainbows
-E none
-D $CONFIG_RU -c $unicorn_config
18 t_begin
"send async requests off in parallel" && {
20 curl
="curl -0 --no-buffer -vsSf http://$listen/"
21 ( $curl 2>> $a_err |
tee $a) &
22 ( $curl 2>> $b_err |
tee $b) &
23 ( $curl 2>> $c_err |
tee $c) &
28 t_begin
"ensure elapsed requests were processed in parallel" && {
29 elapsed
=$
(( $t1 - $t0 ))
30 echo "elapsed=$elapsed < 30"
34 t_begin
"termination signal sent" && {
43 t_begin
"no errors from curl" && {
44 if grep -i Transfer-Encoding
$a_err $b_err $c_err
46 die
"Unexpected Transfer-Encoding: header"
48 for i
in $a_err $b_err $c_err
50 grep 'Connection: close' $i
55 t_begin
"no errors in stderr" && check_stderr