Limit the number of concurrent tests in integration.go

Integration test often time out because the machine is loaded. Instead of
increasing timeout, this change hopes to address the issue by limiting the
number of tests running simultaneously.

Add a new flag in integration.go to specify the maximum number of concurrent
tests. Set the default in travis and shippable configurations to be 4.
This commit is contained in:
Yu-Ju Hong
2015-04-09 15:05:30 -07:00
parent 2215a64567
commit faf47b6f0b
4 changed files with 28 additions and 13 deletions

View File

@@ -26,7 +26,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
# Comma separated list of API Versions that should be tested.
KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1beta1,v1beta3"}
KUBE_INTEGRATION_TEST_MAX_CONCURRENCY=${KUBE_INTEGRATION_TEST_MAX_CONCURRENCY:-"-1"}
cleanup() {
kube::etcd::cleanup
@@ -44,7 +44,8 @@ runTests() {
kube::log::status "Running integration test scenario"
"${KUBE_OUTPUT_HOSTBIN}/integration" --v=2 --apiVersion="$1"
"${KUBE_OUTPUT_HOSTBIN}/integration" --v=2 --apiVersion="$1" \
--maxConcurrency="${KUBE_INTEGRATION_TEST_MAX_CONCURRENCY}"
cleanup
}