Skip to content

Commit

Permalink
Merge pull request #11314 from sbueringer/pr-fix-cc-flake
Browse files Browse the repository at this point in the history
🌱 Fix flake in TestClusterReconciler
  • Loading branch information
k8s-ci-robot authored Oct 21, 2024
2 parents 93928cf + 5ca807e commit f973add
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/controllers/cluster/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ func TestMain(m *testing.M) {
panic(fmt.Sprintf("Failed to create ClusterCache: %v", err))
}

// Setting ConnectionCreationRetryInterval to 2 seconds, otherwise client creation is
// only retried every 30s. If we get unlucky tests are then failing with timeout.
clusterCache.(interface{ SetConnectionCreationRetryInterval(time.Duration) }).
SetConnectionCreationRetryInterval(2 * time.Second)

if err := (&Reconciler{
Client: mgr.GetClient(),
APIReader: mgr.GetClient(),
Expand Down

0 comments on commit f973add

Please sign in to comment.