Files
moby/hack/make/test-integration
Paweł Gronowski 85a59999b2 hack: Fix set_repeat_timeout multiplying TIMEOUT on every repeat iteration
set_repeat_timeout is called inside run_test_integration, which is
itself invoked once per iteration by the repeat loop (TEST_REPEAT
times). Each call multiplied TIMEOUT by TEST_REPEAT again, so with
TEST_REPEAT=10 and TIMEOUT=10m the progression was:

iter 1: 100m, iter 2: 1000m, ..., iter 8: 1000000000m

Go's time.ParseDuration overflows on 1000000000m (≈ 6×10²² ns >
int64 max), producing:

invalid value "1000000000m" for flag -test.timeout: parse error

The multiplier (TEST_REPEAT) and the scaled value (100m) are both
correct; the problem is repeated application. Fix by moving the single
set_repeat_timeout call out of run_test_integration and into
hack/make/test-integration, directly before the repeat loop. That way
TIMEOUT is scaled exactly once regardless of how many iterations the
loop runs.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-07-06 10:24:30 +02:00

29 lines
603 B
Bash
Executable File

#!/usr/bin/env bash
set -e -o pipefail
source hack/make/.integration-test-helpers
if [ ! -z "${TEST_SKIP_INTEGRATION}" ] && [ ! -z "${TEST_SKIP_INTEGRATION_CLI}" ]; then
echo integration and integration-cli skipped according to env vars
exit 0
fi
(
env
build_test_suite_binaries
bundle .integration-daemon-start
testexit=0
set_repeat_timeout
(repeat run_test_integration) || testexit=$?
# Always run cleanup, even if the subshell fails
bundle .integration-daemon-stop
cleanup_test_suite_binaries
echo exiting test-integration
set -x
exit ${testexit}
) &> >(tee -a "$DEST/test.log")