diff --git a/test/framework/e2e_framework.go b/test/framework/e2e_framework.go index 751f491f9..cf83314a4 100644 --- a/test/framework/e2e_framework.go +++ b/test/framework/e2e_framework.go @@ -360,7 +360,7 @@ func (f *E2eFramework) InstallMinio() error { // Wait for the minio rollout to complete opts := kubectl.Options{Namespace: MinioNamespace, Context: k8sContext} - err := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, 5*time.Minute, false, func(ctx context.Context) (bool, error) { + err := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, 5*time.Minute, true, func(ctx context.Context) (bool, error) { if err := kubectl.RolloutStatus(ctx, opts, "Deployment", "minio"); err != nil { f.logger.Info("Waiting for minio rollout to complete: %s", err) return false, err @@ -387,7 +387,7 @@ func (f *E2eFramework) CreateMedusaBucket(namespace string) error { // Wait for job to succeed f.logger.Info("Waiting for setup-minio job to succeed") opts := kubectl.Options{Namespace: namespace, Context: k8sContext} - err := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, 5*time.Minute, false, func(ctx context.Context) (bool, error) { + err := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, 5*time.Minute, true, func(ctx context.Context) (bool, error) { if err := kubectl.JobSuccess(ctx, opts, namespace, "setup-minio"); err != nil { f.logger.Error(err, "Waiting for setup-minio job to succeed") return false, nil @@ -550,7 +550,7 @@ func (f *E2eFramework) DeleteNamespace(name string, timeout, interval time.Durat } // Should this wait.Poll call be per cluster? - return wait.PollUntilContextTimeout(context.TODO(), interval, timeout, false, func(context.Context) (bool, error) { + return wait.PollUntilContextTimeout(context.Background(), interval, timeout, true, func(ctx context.Context) (bool, error) { for _, remoteClient := range f.remoteClients { err := remoteClient.Get(context.TODO(), types.NamespacedName{Name: name}, namespace.DeepCopy()) @@ -730,7 +730,7 @@ func (f *E2eFramework) DeleteReplicatedSecrets(namespace string, timeout, interv return err } - return wait.PollUntilContextTimeout(context.TODO(), interval, timeout, false, func(context.Context) (bool, error) { + return wait.PollUntilContextTimeout(context.Background(), interval, timeout, true, func(ctx context.Context) (bool, error) { list := &replicationapi.ReplicatedSecretList{} if err := f.Client.List(context.Background(), list, client.InNamespace(namespace)); err != nil { f.logger.Error(err, "failed to list ReplicatedSecrets") @@ -764,7 +764,7 @@ func (f *E2eFramework) deleteAllResources( } // Check that all pods created by resources are terminated // FIXME Should there be a separate wait.Poll call per cluster? - return wait.PollUntilContextTimeout(context.TODO(), interval, timeout, false, func(ctx context.Context) (bool, error) { + return wait.PollUntilContextTimeout(context.Background(), interval, timeout, true, func(ctx context.Context) (bool, error) { podListOptions = append(podListOptions, client.InNamespace(namespace)) for k8sContext, remoteClient := range f.remoteClients { list := &corev1.PodList{} diff --git a/test/framework/framework.go b/test/framework/framework.go index b23f5f030..6032e725a 100644 --- a/test/framework/framework.go +++ b/test/framework/framework.go @@ -463,7 +463,7 @@ func (f *Framework) WaitForDeploymentToBeReady(key ClusterKey, timeout, interval if len(key.K8sContext) == 0 { for k8sContext := range f.remoteClients { opts := kubectl.Options{Namespace: key.Namespace, Context: k8sContext} - err := wait.PollUntilContextTimeout(context.Background(), interval, timeout, false, func(ctx context.Context) (bool, error) { + err := wait.PollUntilContextTimeout(context.Background(), interval, timeout, true, func(ctx context.Context) (bool, error) { if err := kubectl.RolloutStatus(ctx, opts, "Deployment", key.Name); err != nil { return false, err } @@ -479,7 +479,7 @@ func (f *Framework) WaitForDeploymentToBeReady(key ClusterKey, timeout, interval return f.k8sContextNotFound(key.K8sContext) } opts := kubectl.Options{Namespace: key.Namespace, Context: key.K8sContext} - return wait.PollUntilContextTimeout(context.Background(), interval, timeout, false, func(ctx context.Context) (bool, error) { + return wait.PollUntilContextTimeout(context.Background(), interval, timeout, true, func(ctx context.Context) (bool, error) { if err := kubectl.RolloutStatus(ctx, opts, "Deployment", key.Name); err != nil { return false, err } @@ -498,7 +498,7 @@ func (f *Framework) DeleteK8ssandraCluster(ctx context.Context, key client.Objec if err != nil { return err } - return wait.PollUntilContextTimeout(context.TODO(), interval, timeout, false, func(context.Context) (bool, error) { + return wait.PollUntilContextTimeout(context.Background(), interval, timeout, true, func(ctx context.Context) (bool, error) { err := f.Client.Get(ctx, key, kc) return err != nil && errors.IsNotFound(err), nil }) @@ -532,7 +532,7 @@ func (f *Framework) DeleteCassandraDatacenters(namespace string, interval, timeo f.logger.Error(err, "Failed to delete CassandraDatacenters") } - return wait.PollUntilContextTimeout(context.TODO(), interval, timeout, false, func(context.Context) (bool, error) { + return wait.PollUntilContextTimeout(context.Background(), interval, timeout, true, func(ctx context.Context) (bool, error) { list := &cassdcapi.CassandraDatacenterList{} err := f.Client.List(context.Background(), list, client.InNamespace(namespace)) if err != nil {