From 12d8abaa6de250e32733f4c4dc5ca08695e01fd1 Mon Sep 17 00:00:00 2001 From: Kensei Nakada Date: Mon, 18 Dec 2023 16:21:42 +0900 Subject: [PATCH] mitigate the flaky HPA webhook tests --- api/autoscaling/v2/horizontalpodautoscaler_webhook_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/autoscaling/v2/horizontalpodautoscaler_webhook_test.go b/api/autoscaling/v2/horizontalpodautoscaler_webhook_test.go index 65afd99a..ea9d94a0 100644 --- a/api/autoscaling/v2/horizontalpodautoscaler_webhook_test.go +++ b/api/autoscaling/v2/horizontalpodautoscaler_webhook_test.go @@ -31,6 +31,7 @@ import ( "errors" "os" "path/filepath" + "time" v2 "k8s.io/api/autoscaling/v2" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -73,6 +74,7 @@ func mutateTest(before, after, tortoise string) { // cleanup err = k8sClient.Delete(ctx, tor) Expect(err).NotTo(HaveOccurred()) + time.Sleep(time.Second) err = k8sClient.Delete(ctx, beforehpa) Expect(err).NotTo(HaveOccurred()) }()