Skip to content

Commit 57bcd2d

Browse files
Reduce polling interval for check
1 parent bff5f05 commit 57bcd2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/envtest/server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,13 @@ func (te *Environment) startControlPlane() error {
334334
}
335335

336336
func (te *Environment) waitForDefaultNamespace(config *rest.Config) error {
337+
fmt.Println("waiting...")
337338
cs, err := client.New(config, client.Options{})
338339
if err != nil {
339340
return fmt.Errorf("unable to create client: %w", err)
340341
}
341342
// It shouldn't take longer than 5s for the default namespace to be brought up in etcd
342-
return wait.PollUntilContextTimeout(context.TODO(), time.Millisecond*500, time.Second*5, true, func(ctx context.Context) (bool, error) {
343+
return wait.PollUntilContextTimeout(context.TODO(), time.Millisecond*50, time.Second*5, true, func(ctx context.Context) (bool, error) {
343344
if err = cs.Get(ctx, types.NamespacedName{Name: "default"}, &corev1.Namespace{}); err != nil {
344345
return false, nil //nolint:nilerr
345346
}

0 commit comments

Comments
 (0)