From e55a640e9eb7fc958b8eb0263a2dc8e60a714c73 Mon Sep 17 00:00:00 2001 From: Miles Garnsey Date: Fri, 30 Aug 2024 17:27:37 +0200 Subject: [PATCH] Ensure that waitForTaskFailed works as expected. --- internal/controllers/control/cassandratask_controller_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/controllers/control/cassandratask_controller_test.go b/internal/controllers/control/cassandratask_controller_test.go index 3dc95304..9e722fd4 100644 --- a/internal/controllers/control/cassandratask_controller_test.go +++ b/internal/controllers/control/cassandratask_controller_test.go @@ -235,7 +235,7 @@ func waitForTaskFailed(taskKey types.NamespacedName) *api.CassandraTask { err := k8sClient.Get(context.TODO(), taskKey, emptyTask) Expect(err).ToNot(HaveOccurred()) - return emptyTask.Status.CompletionTime == nil + return emptyTask.Status.Failed > 0 }, time.Duration(5*time.Second)).Should(BeTrue()) return emptyTask }