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