about summary refs log tree commit homepage
path: root/t/t2000-thread-spawn-basic.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t2000-thread-spawn-basic.sh')
-rwxr-xr-xt/t2000-thread-spawn-basic.sh38
1 files changed, 1 insertions, 37 deletions
diff --git a/t/t2000-thread-spawn-basic.sh b/t/t2000-thread-spawn-basic.sh
index 37aa029..7942942 100755
--- a/t/t2000-thread-spawn-basic.sh
+++ b/t/t2000-thread-spawn-basic.sh
@@ -1,38 +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 :ThreadSpawn
-  worker_connections $nr_thread
-end
-EOF
-
-rainbows -D t2000.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" -eq $nr_client
-! grep Error $r_err
+. ./lib-simple-http.sh