Skip to content

Commit 575f3c0

Browse files
committed
Align e2e test timeouts
So that ginkgo times out first and we get useful output. Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
1 parent c7a47d1 commit 575f3c0

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,9 @@ jobs:
616616
- name: Run Tests
617617
# e2e tests take ~60 minutes normally, 120 should be more than enough
618618
# set 3 hours for control-plane tests as these might take a while
619-
timeout-minutes: ${{ matrix.target == 'control-plane' && 180 || matrix.target == 'control-plane-helm' && 180 || matrix.target == 'external-gateway' && 180 || 120 }}
619+
# give 10m extra to give ginkgo chance to timeout before github so that we
620+
# get its output
621+
timeout-minutes: ${{ matrix.target == 'bgp' && 190 || matrix.target == 'control-plane' && 190 || matrix.target == 'control-plane-helm' && 190 || matrix.target == 'external-gateway' && 190 || 130 }}
620622
run: |
621623
# used by e2e diagnostics package
622624
export OVN_IMAGE="ovn-daemonset-fedora:pr"

test/scripts/e2e-cp.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,18 @@ export NUM_NODES=2
184184

185185
FOCUS=$(echo ${@:1} | sed 's/ /\\s/g')
186186

187+
# Ginkgo test timeout needs to be lower than both github's timeout and go test
188+
# timeout to be able to get proper Ginkgo output when it happens.
189+
TEST_TIMEOUT=${TEST_TIMEOUT:-180}
190+
GO_TEST_TIMEOUT=$((TEST_TIMEOUT + 5))
191+
187192
pushd e2e
188193

189194
go mod download
190-
go test -test.timeout 180m -v . \
195+
go test -test.timeout ${GO_TEST_TIMEOUT}m -v . \
191196
-ginkgo.v \
192197
-ginkgo.focus ${FOCUS:-.} \
193-
-ginkgo.timeout 3h \
198+
-ginkgo.timeout ${TEST_TIMEOUT}m \
194199
-ginkgo.flake-attempts ${FLAKE_ATTEMPTS:-2} \
195200
-ginkgo.skip="${SKIPPED_TESTS}" \
196201
-ginkgo.junit-report=${E2E_REPORT_DIR}/junit_${E2E_REPORT_PREFIX}report.xml \

test/scripts/e2e-kind.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ fi
200200
# timeout needs to be lower than github's timeout. Otherwise github terminates
201201
# the job and doesn't give ginkgo a chance to print status so that we know why
202202
# the timeout happened.
203-
TEST_TIMEOUT=${TEST_TIMEOUT:-100m}
203+
TEST_TIMEOUT=${TEST_TIMEOUT:-120m}
204204

205205
ginkgo --nodes=${NUM_NODES} \
206206
--focus=${FOCUS} \

0 commit comments

Comments
 (0)