2 CONFIG_RU
=${CONFIG_RU-'async-response.ru'}
7 t_plan
7 "async response w/o autochunk for $model"
11 t_plan
6 "async response for $model"
16 t_begin
"setup and start" && {
18 rtmpfiles a b c curl_err
19 # can't load Rack::Lint here since it'll cause Rev to slurp
20 rainbows
-E none
-D $CONFIG_RU -c $unicorn_config
24 t_begin
"send async requests off in parallel" && {
26 ( curl
--no-buffer -sSf http
://$listen/ 2>> $curl_err | utee
$a) &
27 ( curl
--no-buffer -sSf http
://$listen/ 2>> $curl_err | utee
$b) &
28 ( curl
--no-buffer -sSf http
://$listen/ 2>> $curl_err | utee
$c) &
33 t_begin
"ensure elapsed requests were processed in parallel" && {
34 elapsed
=$
(( $t1 - $t0 ))
35 echo "elapsed=$elapsed < 30"
39 t_begin
"termination signal sent" && {
49 t_begin
"no errors from curl" && {
53 t_begin
"no errors in stderr" && check_stderr
59 t_begin
"no responses are chunked" && {
60 test x
"$(cat $a)" = x0123456789
61 test x
"$(cat $b)" = x0123456789
62 test x
"$(cat $c)" = x0123456789