Skip to content

Commit

Permalink
mitigate the flaky HPA webhook tests (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanposhiho authored Dec 18, 2023
1 parent 2a5a3c0 commit 615353f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/autoscaling/v2/horizontalpodautoscaler_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"errors"
"os"
"path/filepath"
"time"

v2 "k8s.io/api/autoscaling/v2"
apierrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -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())
}()
Expand Down

0 comments on commit 615353f

Please sign in to comment.