mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 19:21:37 +00:00
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user