2 CONFIG_RU
=${CONFIG_RU-'async-response.ru'}
5 skip_models Base WriterThreadPool WriterThreadSpawn
6 skip_models StreamResponseEpoll
10 t_plan
7 "async response w/o autochunk for $model"
14 t_plan
6 "async response for $model"
19 t_begin
"setup and start" && {
21 rtmpfiles a b c curl_err
22 # can't load Rack::Lint here since it'll cause Rev to slurp
23 rainbows
-E none
-D $CONFIG_RU -c $unicorn_config
27 t_begin
"send async requests off in parallel" && {
29 ( curl
--no-buffer -sSf http
://$listen/ 2>> $curl_err | utee
$a) &
30 ( curl
--no-buffer -sSf http
://$listen/ 2>> $curl_err | utee
$b) &
31 ( curl
--no-buffer -sSf http
://$listen/ 2>> $curl_err | utee
$c) &
36 t_begin
"ensure elapsed requests were processed in parallel" && {
37 elapsed
=$
(( $t1 - $t0 ))
38 echo "elapsed=$elapsed < 30"
42 t_begin
"termination signal sent" && {
52 t_begin
"no errors from curl" && {
56 t_begin
"no errors in stderr" && check_stderr
62 t_begin
"no responses are chunked" && {
63 test x
"$(cat $a)" = x0123456789
64 test x
"$(cat $b)" = x0123456789
65 test x
"$(cat $c)" = x0123456789