6 t_info
"skipping $T since it's not compatible with $model"
11 t_plan
5 "basic test for app.deferred? usage"
13 CONFIG_RU
=app_deferred.ru
15 t_begin
"setup and start" && {
17 rtmpfiles deferred_err deferred_out sync_err sync_out
18 rainbows
-D -c $unicorn_config $CONFIG_RU
22 t_begin
"synchronous requests run in the same thread" && {
23 curl
--no-buffer -sSf http
://$listen/ >> $sync_out 2>> $sync_err &
24 curl
--no-buffer -sSf http
://$listen/ >> $sync_out 2>> $sync_err &
25 curl
--no-buffer -sSf http
://$listen/ >> $sync_out 2>> $sync_err &
28 test 3 -eq "$(wc -l < $sync_out)"
29 test 1 -eq "$(uniq < $sync_out | wc -l)"
32 t_begin
"deferred requests run in a different thread" && {
33 curl
-sSf http
://$listen/deferred
>> $deferred_out 2>> $deferred_err
34 test ! -s $deferred_err
35 sync_thread
="$(uniq < $sync_out)"
36 test x
"$(uniq < $deferred_out)" != x
"$sync_thread"
39 t_begin
"termination signal sent" && {
43 t_begin
"no errors in stderr" && check_stderr