summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-11-03 14:39:44 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-11-03 14:39:44 -0800
commit4b655ab22c1209ebdab5cee909bd01c244a84e2d (patch)
tree0b0306a198d737f1449979ede912e88831e75086 /tests
parentd9d11042ca03fe2f2dea6c9bbae3a5b1e62c818a (diff)
downloadinfinitytier-4b655ab22c1209ebdab5cee909bd01c244a84e2d.tar.gz
infinitytier-4b655ab22c1209ebdab5cee909bd01c244a84e2d.zip
tests
Diffstat (limited to 'tests')
-rw-r--r--tests/http/agent.js8
-rwxr-xr-xtests/http/big-test-kill.sh13
-rwxr-xr-xtests/http/big-test-ready.sh30
-rwxr-xr-xtests/http/big-test-start.sh26
-rwxr-xr-xtests/http/docker-main.sh4
5 files changed, 13 insertions, 68 deletions
diff --git a/tests/http/agent.js b/tests/http/agent.js
index bc7c475e..e90ee482 100644
--- a/tests/http/agent.js
+++ b/tests/http/agent.js
@@ -4,20 +4,20 @@
// Customizable parameters:
// Maximum interval between test attempts
-var TEST_INTERVAL_MAX = 60000;
+var TEST_INTERVAL_MAX = (60000 * 5);
// Test timeout in ms
-var TEST_TIMEOUT = 30000;
+var TEST_TIMEOUT = 60000;
// Where should I contact to register and query a list of other test agents?
-var SERVER_HOST = '104.238.141.145';
+var SERVER_HOST = '174.136.102.178';
var SERVER_PORT = 18080;
// Which port should agents use for their HTTP?
var AGENT_PORT = 18888;
// Payload size in bytes
-var PAYLOAD_SIZE = 10000;
+var PAYLOAD_SIZE = 5000;
// ---------------------------------------------------------------------------
diff --git a/tests/http/big-test-kill.sh b/tests/http/big-test-kill.sh
index 59f36788..29dbd638 100755
--- a/tests/http/big-test-kill.sh
+++ b/tests/http/big-test-kill.sh
@@ -1,18 +1,9 @@
#!/bin/bash
-# Edit as needed -- note that >1000 per host is likely problematic due to Linux kernel limits
-NUM_CONTAINERS=100
-CONTAINER_IMAGE=zerotier/http-test
-
-#
-# This script is designed to be run on Docker hosts to run NUM_CONTAINERS
-#
-# It can then be run on each Docker host via pssh or similar to run very
-# large scale tests.
-#
+# Kills all running Docker containers on all big-test-hosts
export PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin:/sbin
-pssh -h big-test-hosts -i -t 0 -p 256 "docker ps -aq | xargs -r docker rm -f"
+pssh -h big-test-hosts -i -t 0 -p 256 "sudo docker ps -aq | xargs -r sudo docker rm -f"
exit 0
diff --git a/tests/http/big-test-ready.sh b/tests/http/big-test-ready.sh
deleted file mode 100755
index aa540bba..00000000
--- a/tests/http/big-test-ready.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-# Edit as needed -- note that >1000 per host is likely problematic due to Linux kernel limits
-NUM_CONTAINERS=100
-CONTAINER_IMAGE=zerotier/http-test
-
-#
-# This script is designed to be run on Docker hosts to run NUM_CONTAINERS
-#
-# It can then be run on each Docker host via pssh or similar to run very
-# large scale tests.
-#
-
-export PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin:/sbin
-
-# Kill and clean up old test containers if any -- note that this kills all containers on the system!
-#docker ps -q | xargs -n 1 docker kill
-#docker ps -aq | xargs -n 1 docker rm
-
-# Pull latest if needed -- change this to your image name and/or where to pull it from
-#docker pull $CONTAINER_IMAGE
-
-# Run NUM_CONTAINERS
-#for ((n=0;n<$NUM_CONTAINERS;n++)); do
-# docker run --device=/dev/net/tun --privileged -d $CONTAINER_IMAGE
-#done
-
-pssh -h big-test-hosts -i -t 0 -p 256 "docker pull $CONTAINER_IMAGE"
-
-exit 0
diff --git a/tests/http/big-test-start.sh b/tests/http/big-test-start.sh
index f300ac61..3ef4a316 100755
--- a/tests/http/big-test-start.sh
+++ b/tests/http/big-test-start.sh
@@ -1,30 +1,12 @@
#!/bin/bash
-# Edit as needed -- note that >1000 per host is likely problematic due to Linux kernel limits
-NUM_CONTAINERS=50
+# More than 500 container seems to result in a lot of sporadic failures, probably due to Linux kernel scaling issues with virtual network ports
+# 250 with a 16GB RAM VM like Amazon m4.xlarge seems good
+NUM_CONTAINERS=250
CONTAINER_IMAGE=zerotier/http-test
-#
-# This script is designed to be run on Docker hosts to run NUM_CONTAINERS
-#
-# It can then be run on each Docker host via pssh or similar to run very
-# large scale tests.
-#
-
export PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin:/sbin
-# Kill and clean up old test containers if any -- note that this kills all containers on the system!
-#docker ps -q | xargs -n 1 docker kill
-#docker ps -aq | xargs -n 1 docker rm
-
-# Pull latest if needed -- change this to your image name and/or where to pull it from
-#docker pull $CONTAINER_IMAGE
-
-# Run NUM_CONTAINERS
-#for ((n=0;n<$NUM_CONTAINERS;n++)); do
-# docker run --device=/dev/net/tun --privileged -d $CONTAINER_IMAGE
-#done
-
-pssh -h big-test-hosts -o big-test-out -t 0 -p 256 "for ((n=0;n<$NUM_CONTAINERS;n++)); do docker run --device=/dev/net/tun --privileged -d $CONTAINER_IMAGE; sleep 0.25; done"
+pssh -h big-test-hosts -o big-test-out -t 0 -p 256 "for ((n=0;n<$NUM_CONTAINERS;n++)); do sudo docker run --device=/dev/net/tun --privileged -d $CONTAINER_IMAGE; sleep 0.1; done"
exit 0
diff --git a/tests/http/docker-main.sh b/tests/http/docker-main.sh
index f9e11de5..29cdced9 100755
--- a/tests/http/docker-main.sh
+++ b/tests/http/docker-main.sh
@@ -4,11 +4,13 @@ export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
/zerotier-one -d >>zerotier-one.out 2>&1
+# Wait for ZeroTier to start and join the network
while [ ! -d "/proc/sys/net/ipv6/conf/zt0" ]; do
sleep 0.25
done
-sleep 2
+# Wait just a bit longer for stuff to settle
+sleep 5
exec node --harmony /agent.js >>agent.out 2>&1
#exec node --harmony /agent.js