about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-18 00:08:52 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-18 00:08:52 -0800
commit77f930cb64d32b3fac942b462cf4c7a04af730e3 (patch)
tree6612d92c7d3681f0701969db5060afd6c65c62e0 /t
parent02245b9ea8a407ac67a9633119140fa2fd2c561e (diff)
downloadrainbows-77f930cb64d32b3fac942b462cf4c7a04af730e3.tar.gz
And change the default to 2 seconds, most clients can
render the page and load all URLs within 2 seconds.
Diffstat (limited to 't')
-rw-r--r--t/test-lib.sh16
1 files changed, 13 insertions, 3 deletions
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
 }