From d204560fdb49587645ebaf4f5ceb17f19078dec2 Mon Sep 17 00:00:00 2001 From: Pierangelo Di Pilato Date: Mon, 8 Aug 2022 14:45:00 +0200 Subject: [PATCH] Retry webhook EOF errors This test sometimes fails due to [1]. [1] https://github.com/knative/pkg/issues/1509 Signed-off-by: Pierangelo Di Pilato --- test/scripts/first-event-delay.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/scripts/first-event-delay.sh b/test/scripts/first-event-delay.sh index f4d4f3be37..f43cf83f76 100755 --- a/test/scripts/first-event-delay.sh +++ b/test/scripts/first-event-delay.sh @@ -154,11 +154,16 @@ function wait_for_cloudevent { done } +function create { + app foo$i | ko resolve ${KO_FLAGS} -Bf - | kubectl apply -f - +} + function run { i=$1 + # Retry 3 times, workaround for https://github.com/knative/pkg/issues/1509 + create "$i" || create "$i" || create "$i" || return $? failed=false - app foo$i | ko resolve ${KO_FLAGS} -Bf - | kubectl apply -f - kubectl wait kafkachannel --timeout=60s -n foo$i channel --for=condition=Ready=True || failed=true kubectl wait subscription --timeout=60s -n foo$i event-display --for=condition=Ready=True || failed=true