diff --git a/internal/webhooks/test/clusterclass_test.go b/internal/webhooks/test/clusterclass_test.go index 702c55ca2975..fcf0ca9c0e0d 100644 --- a/internal/webhooks/test/clusterclass_test.go +++ b/internal/webhooks/test/clusterclass_test.go @@ -446,7 +446,7 @@ func TestClusterClassWebhook_Delete_MultipleExistingClusters(t *testing.T) { defer func() { // Delete each of the clusters. for _, c := range clusters { - g.Expect(env.Delete(ctx, c)).To(Succeed()) + g.Expect(env.CleanupAndWait(ctx, c)).To(Succeed()) } // Delete the ClusterClasses in the API server.