Skip to content

Commit

Permalink
test: waiting for cache
Browse files Browse the repository at this point in the history
Signed-off-by: nwaiyatharee <[email protected]>
  • Loading branch information
agoda-devops-container committed Sep 24, 2024
1 parent 93c9617 commit 81ec82f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controller/client/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package client_test
import (
"context"
"testing"
"time"

corev1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -56,7 +57,7 @@ var _ = Describe("Test clients", func() {
Ω(_cache.Start(ctx)).To(Succeed())
}()

// Eventually(func() bool { return _cache.WaitForCacheSync(ctx) }).WithTimeout(time.Second).Should(BeTrue(), "cache should be synced within a second")
Eventually(func() bool { return _cache.WaitForCacheSync(ctx) }).WithTimeout(time.Second).Should(BeTrue(), "cache should be synced within a second")
velaclient.CachedGVKs = "Deployment.apps.v1"
_client, err := velaclient.DefaultNewControllerClient(cfg, client.Options{
Cache: &client.CacheOptions{
Expand Down

0 comments on commit 81ec82f

Please sign in to comment.