diff options
-rw-r--r--[-rwxr-xr-x] | t/lib-rack-input-hammer.sh (renamed from t/t3100-revactor-tee-input.sh) | 9 | ||||
-rwxr-xr-x | t/t1100-thread-pool-rack-input.sh | 2 | ||||
-rwxr-xr-x | t/t2100-thread-spawn-rack-input.sh | 2 | ||||
-rwxr-xr-x | t/t3100-revactor-rack-input.sh | 2 | ||||
-rwxr-xr-x | t/t4100-rev-rack-input.sh | 43 |
5 files changed, 9 insertions, 49 deletions
diff --git a/t/t3100-revactor-tee-input.sh b/t/lib-rack-input-hammer.sh index 5b580b5..11f0479 100755..100644 --- a/t/t3100-revactor-tee-input.sh +++ b/t/lib-rack-input-hammer.sh @@ -1,7 +1,4 @@ -#!/bin/sh -nr_client=${nr_client-25} -nr_actor=${nr_actor-50} - +nr_client=${nr_client-4} . ./test-lib.sh test -r random_blob || die "random_blob required, run with 'make $0'" @@ -14,12 +11,10 @@ pid "$pid" stderr_path "$r_err" stdout_path "$r_out" Rainbows! do - use :Revactor - worker_connections $nr_actor + use :$model end EOF -echo pid=$pid rainbows -D sha1.ru -c $unicorn_config wait_for_pid $pid diff --git a/t/t1100-thread-pool-rack-input.sh b/t/t1100-thread-pool-rack-input.sh new file mode 100755 index 0000000..4d6d4c9 --- /dev/null +++ b/t/t1100-thread-pool-rack-input.sh @@ -0,0 +1,2 @@ +#!/bin/sh +. ./lib-rack-input-hammer.sh diff --git a/t/t2100-thread-spawn-rack-input.sh b/t/t2100-thread-spawn-rack-input.sh new file mode 100755 index 0000000..4d6d4c9 --- /dev/null +++ b/t/t2100-thread-spawn-rack-input.sh @@ -0,0 +1,2 @@ +#!/bin/sh +. ./lib-rack-input-hammer.sh diff --git a/t/t3100-revactor-rack-input.sh b/t/t3100-revactor-rack-input.sh new file mode 100755 index 0000000..4d6d4c9 --- /dev/null +++ b/t/t3100-revactor-rack-input.sh @@ -0,0 +1,2 @@ +#!/bin/sh +. ./lib-rack-input-hammer.sh diff --git a/t/t4100-rev-rack-input.sh b/t/t4100-rev-rack-input.sh index 2368269..4d6d4c9 100755 --- a/t/t4100-rev-rack-input.sh +++ b/t/t4100-rev-rack-input.sh @@ -1,43 +1,2 @@ #!/bin/sh -nr_client=${nr_client-25} -nr=${nr-50} - -. ./test-lib.sh -test -r random_blob || die "random_blob required, run with 'make $0'" - -eval $(unused_listen) -rtmpfiles unicorn_config curl_out curl_err r_err r_out pid - -cat > $unicorn_config <<EOF -listen "$listen" -pid "$pid" -stderr_path "$r_err" -stdout_path "$r_out" -Rainbows! do - use :Rev - worker_connections $nr -end -EOF - -echo pid=$pid -rainbows -D sha1.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 -T- http://$listen/$i \ - < random_blob >> $curl_out 2>> $curl_err - ) & -done -wait -echo elapsed=$(( $(date +%s) - $start )) - -kill $(cat $pid) -test $nr_client -eq $(wc -l < $curl_out) -test 1 -eq $(sort < $curl_out | uniq | wc -l) -blob_sha1=$( expr "$(sha1sum < random_blob)" : '\([a-f0-9]\+\)') -echo blob_sha1=$blob_sha1 -test x"$blob_sha1" = x"$(sort < $curl_out | uniq)" -! grep Error $r_err +. ./lib-rack-input-hammer.sh |