@@ -23,6 +23,7 @@ import (
2323 "os"
2424 "os/exec"
2525 "testing"
26+ "time"
2627
2728 . "github.com/onsi/ginkgo/v2"
2829 . "github.com/onsi/gomega"
@@ -43,6 +44,20 @@ func getenvOrDefault(name, fallback string) string {
4344 return fallback
4445}
4546
47+ func configureEventuallyDefaults () {
48+ if timeoutRaw := os .Getenv ("IMP_E2E_EVENTUALLY_TIMEOUT" ); timeoutRaw != "" {
49+ timeout , err := time .ParseDuration (timeoutRaw )
50+ Expect (err ).NotTo (HaveOccurred (), "invalid IMP_E2E_EVENTUALLY_TIMEOUT" )
51+ SetDefaultEventuallyTimeout (timeout )
52+ }
53+
54+ if intervalRaw := os .Getenv ("IMP_E2E_EVENTUALLY_POLL_INTERVAL" ); intervalRaw != "" {
55+ interval , err := time .ParseDuration (intervalRaw )
56+ Expect (err ).NotTo (HaveOccurred (), "invalid IMP_E2E_EVENTUALLY_POLL_INTERVAL" )
57+ SetDefaultEventuallyPollingInterval (interval )
58+ }
59+ }
60+
4661// Note: the Kind cluster itself is managed by the CI workflow (helm/kind-action@v1) or
4762// must be created manually before running these tests locally:
4863//
@@ -51,6 +66,8 @@ func getenvOrDefault(name, fallback string) string {
5166// kind delete cluster --name imp-e2e
5267
5368var _ = BeforeSuite (func () {
69+ configureEventuallyDefaults ()
70+
5471 By ("creating namespace" )
5572 nsCmd := exec .Command ("kubectl" , "create" , "ns" , namespace )
5673 _ , _ = utils .Run (nsCmd ) // ignore if already exists
0 commit comments