From 77f930cb64d32b3fac942b462cf4c7a04af730e3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 18 Nov 2009 00:08:52 -0800 Subject: make keepalive_timeout configurable And change the default to 2 seconds, most clients can render the page and load all URLs within 2 seconds. --- t/test-lib.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/test-lib.sh b/t/test-lib.sh index 1e22cb3..e795494 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -115,15 +115,25 @@ before_fork do |server, worker| 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 } -- cgit v1.2.3-24-ge0c7