5 NeverBlock|EventMachine
) ;;
7 t_info
"skipping $T since it's not compatible with $model"
12 t_plan
7 "async_app test for test for EM"
14 CONFIG_RU
=async_examples
/async_app.ru
16 t_begin
"setup and start" && {
18 rtmpfiles a b c curl_err expect
20 # this does not does not support Rack::Lint
21 rainbows
-E deployment
-D $CONFIG_RU -c $unicorn_config
25 t_begin
"send async requests off in parallel" && {
27 curl
--no-buffer -sSf http
://$listen/ > $a 2>> $curl_err &
28 curl
--no-buffer -sSf http
://$listen/ > $b 2>> $curl_err &
29 curl
--no-buffer -sSf http
://$listen/ > $c 2>> $curl_err &
32 t_begin
"wait for curl terminations" && {
35 elapsed
=$
(( $t1 - $t0 ))
36 t_info
"elapsed=$elapsed"
39 t_begin
"termination signal sent" && {
43 t_begin
"no errors from curl" && {
47 t_begin
"no errors in stderr" && check_stderr
49 t_begin
"responses match expected" && {
50 echo 'Woah, async!' > $expect
51 printf 'Cheers then!' >> $expect