about summary refs log tree commit homepage
path: root/t/t1000-thread-pool-basic.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-10-17 22:42:56 -0700
committerEric Wong <normalperson@yhbt.net>2009-10-17 22:42:56 -0700
commit61a50566ea0799a9b19c3dcfdf9b1ae5ea083dd2 (patch)
treef28eeeb655e378fc187e28199af62d37aa1c98c2 /t/t1000-thread-pool-basic.sh
parent0719c5a7ac09078c810507244a86ba44623757c4 (diff)
downloadrainbows-61a50566ea0799a9b19c3dcfdf9b1ae5ea083dd2.tar.gz
We support pipelining, keepalive, and even HTTP/0.9!
Diffstat (limited to 't/t1000-thread-pool-basic.sh')
-rwxr-xr-xt/t1000-thread-pool-basic.sh42
1 files changed, 1 insertions, 41 deletions
diff --git a/t/t1000-thread-pool-basic.sh b/t/t1000-thread-pool-basic.sh
index 1510ab6..7942942 100755
--- a/t/t1000-thread-pool-basic.sh
+++ b/t/t1000-thread-pool-basic.sh
@@ -1,42 +1,2 @@
 #!/bin/sh
-. ./test-lib.sh
-
-eval $(unused_listen)
-rtmpfiles unicorn_config curl_out curl_err pid r_err r_out
-
-nr_client=30
-nr_thread=10
-
-cat > $unicorn_config <<EOF
-stderr_path "$r_err"
-stdout_path "$r_out"
-listen "$listen"
-pid "$pid"
-Rainbows! do
-  use :ThreadPool
-  worker_connections $nr_thread
-end
-EOF
-
-rainbows -D t1000.ru -c $unicorn_config
-wait_for_pid $pid
-
-start=$(date +%s)
-for i in $(awk "BEGIN{for(i=0;i<$nr_client;++i) print i}" </dev/null)
-do
-        ( curl -sSf http://$listen/$i >> $curl_out 2>> $curl_err ) &
-done
-wait
-echo elapsed=$(( $(date +%s) - $start ))
-
-kill $(cat $pid)
-
-! test -s $curl_err
-test x"$(wc -l < $curl_out)" = x$nr_client
-
-nr=$(sort < $curl_out | uniq | wc -l)
-
-test "$nr" -le $nr_thread
-test "$nr" -gt 1
-
-! grep Error $r_err
+. ./lib-simple-http.sh