t/test-lib.sh in rainbows-0.6.0 vs t/test-lib.sh in rainbows-0.7.0

- old
+ new

@@ -78,11 +78,11 @@ check_stderr () { set +u _r_err=${1-${r_err}} set -u - if grep Error $_r_err + if grep -i Error $_r_err then die "Errors found in $_r_err" elif grep SIGKILL $_r_err then die "SIGKILL found in $_r_err" @@ -113,18 +113,28 @@ File.open("$fifo", "wb") { |fp| fp.syswrite "START" } end end EOF { + # set a higher default for tests since we run heavily-loaded + # boxes and sometimes sleep 1s in tests + kato=5 + echo 'Rainbows! do' if test $# -ge 1 then - echo 'Rainbows! do' echo " use :$1" test $# -eq 2 && echo " worker_connections $2" - echo end + if test $# -eq 3 + then + echo " keepalive_timeout $3" + else + echo " keepalive_timeout $kato" + fi else - echo "Rainbows! { use :$model }" + echo " use :$model" + echo " keepalive_timeout $kato" fi + echo end } >> $unicorn_config } rainbows_wait_start () { # "cat $fifo" will block until the before_fork hook is called in