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