From 75097cf09a153baf7e8504e656792c12faf0a211 Mon Sep 17 00:00:00 2001 From: Djordje Lukic Date: Thu, 31 Aug 2023 10:39:28 +0200 Subject: [PATCH] test: remove platform related timeout values These were dependent on the DOCKER_ENGINE_GOARCH environment variable but this var was no longer set. There was also some weird check to see if the architecture is "windows" which doesn't make sense. Seeing how nothing failed ever since the TIMEOUT was no longer platform-dependent we can safely remove this check. Signed-off-by: Djordje Lukic --- hack/make/.integration-test-helpers | 15 +++------------ hack/test/e2e-run.sh | 22 +--------------------- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/hack/make/.integration-test-helpers b/hack/make/.integration-test-helpers index 169ff0c70128434f0a5dc5fd4666220828f17fe7..8dfae129573af58df40fd7832f6dd5b60f1d2181 100644 --- a/hack/make/.integration-test-helpers +++ b/hack/make/.integration-test-helpers @@ -14,6 +14,7 @@ source "${MAKEDIR}/.go-autogen" # Set defaults : "${TEST_REPEAT:=1}" +: "${TIMEOUT:=5m}" : "${TESTFLAGS:=}" : "${TESTDEBUG:=}" : "${TESTCOVERAGE:=}" @@ -54,7 +55,7 @@ else fi run_test_integration() { - set_platform_timeout + set_repeat_timeout local failed=0 if [ -z "${TEST_SKIP_INTEGRATION}" ]; then if ! run_test_integration_suites "${integration_api_dirs}"; then @@ -181,7 +182,6 @@ test_env() { DOCKER_INTEGRATION_DAEMON_DEST="$DOCKER_INTEGRATION_DAEMON_DEST" \ DOCKER_TLS_VERIFY="$DOCKER_TEST_TLS_VERIFY" \ DOCKER_CERT_PATH="$DOCKER_TEST_CERT_PATH" \ - DOCKER_ENGINE_GOARCH="$DOCKER_ENGINE_GOARCH" \ DOCKER_GRAPHDRIVER="$DOCKER_GRAPHDRIVER" \ DOCKER_USERLANDPROXY="$DOCKER_USERLANDPROXY" \ DOCKER_HOST="$DOCKER_HOST" \ @@ -201,16 +201,7 @@ test_env() { ) } -set_platform_timeout() { - # Test timeout. - if [ "${DOCKER_ENGINE_GOARCH}" = "arm64" ] || [ "${DOCKER_ENGINE_GOARCH}" = "arm" ]; then - : "${TIMEOUT:=10m}" - elif [ "${DOCKER_ENGINE_GOARCH}" = "windows" ]; then - : "${TIMEOUT:=8m}" - else - : "${TIMEOUT:=5m}" - fi - +set_repeat_timeout() { if [ "${TEST_REPEAT}" -gt 1 ]; then # TIMEOUT needs to take TEST_REPEAT into account, or a premature time out may happen. # The following ugliness will: diff --git a/hack/test/e2e-run.sh b/hack/test/e2e-run.sh index 5e4d8f2154b88407ec3d845f13978f338da7bd71..37b25db2d495872a299f4679ccd167962d87aeb8 100755 --- a/hack/test/e2e-run.sh +++ b/hack/test/e2e-run.sh @@ -1,13 +1,6 @@ #!/usr/bin/env bash set -e -u -o pipefail -ARCH=$(uname -m) -if [ "$ARCH" = "x86_64" ]; then - ARCH="amd64" -fi - -export DOCKER_ENGINE_GOARCH=${DOCKER_ENGINE_GOARCH:-${ARCH}} - # Set defaults : ${TESTFLAGS:=} : ${TESTDEBUG:=} @@ -18,13 +11,12 @@ integration_api_dirs=${TEST_INTEGRATION_DIR:-"$( )"} run_test_integration() { - set_platform_timeout run_test_integration_suites run_test_integration_legacy_suites } run_test_integration_suites() { - local flags="-test.v -test.timeout=${TIMEOUT:-10m} $TESTFLAGS" + local flags="-test.v -test.timeout=${TIMEOUT} $TESTFLAGS" for dir in $integration_api_dirs; do if ! ( cd $dir @@ -53,7 +45,6 @@ test_env() { DOCKER_INTEGRATION_DAEMON_DEST="$DOCKER_INTEGRATION_DAEMON_DEST" \ DOCKER_TLS_VERIFY="$DOCKER_TEST_TLS_VERIFY" \ DOCKER_CERT_PATH="$DOCKER_TEST_CERT_PATH" \ - DOCKER_ENGINE_GOARCH="$DOCKER_ENGINE_GOARCH" \ DOCKER_GRAPHDRIVER="$DOCKER_GRAPHDRIVER" \ DOCKER_USERLANDPROXY="$DOCKER_USERLANDPROXY" \ DOCKER_HOST="$DOCKER_HOST" \ @@ -69,16 +60,5 @@ test_env() { ) } -set_platform_timeout() { - # Test timeout. - if [ "${DOCKER_ENGINE_GOARCH}" = "arm64" ] || [ "${DOCKER_ENGINE_GOARCH}" = "arm" ]; then - : ${TIMEOUT:=10m} - elif [ "${DOCKER_ENGINE_GOARCH}" = "windows" ]; then - : ${TIMEOUT:=8m} - else - : ${TIMEOUT:=5m} - fi -} - sh /scripts/build-empty-images.sh run_test_integration