HoustonPutman commented on code in PR #903:
URL: https://github.com/apache/solr-operator/pull/903#discussion_r4622585196


##########
tests/e2e/resource_utils_test.go:
##########
@@ -832,6 +832,15 @@ func cleanupTest(ctx context.Context, parentResource 
client.Object) {
        for _, item := range serviceList.Items {
                Expect(k8sClient.Delete(ctx, &item)).To(Or(Succeed(), 
MatchError("services \""+item.Name+"\" not found")))
        }
+
+       // The next spec in this namespace reuses the same pod names. If an old 
pod is still terminating, its StatefulSet
+       // cannot create the replacement, and only retries with an ever-growing 
backoff once the old pod is gone.
+       By("waiting for all pods to be deleted")
+       Eventually(func(g Gomega) {
+               podList := &corev1.PodList{}
+               g.Expect(k8sClient.List(ctx, podList, 
client.InNamespace(parentResource.GetNamespace()))).To(Succeed(), "List all of 
the pods in the namespace")
+               g.Expect(podList.Items).To(BeEmpty(), "Pods still exist in the 
namespace after cleanup")
+       }).WithContext(ctx).Within(time.Minute * 3).Should(Succeed())

Review Comment:
   I'd rather it fail faster. It shouldn't take more than a minute for a pod to 
be deleted.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to