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


##########
controllers/util/solr_update_util_test.go:
##########
@@ -180,6 +205,26 @@ func TestPickPodsToUpgrade(t *testing.T) {
        solrCloud.Spec.Replicas = Replicas(4)
        podsToUpgrade = getPodNames(pickPodsToUpdate(solrCloud, lastPod, 
testHealthyClusterStatus, overseerLeader, 6, log))
        assert.ElementsMatch(t, []string{"foo-solrcloud-0"}, podsToUpgrade, 
"Incorrect set of next pods to upgrade. The overseer should be upgraded when 
everything is healthy and it is the last node, even though this SolrCloud 
resource doesn't manage all Nodes")
+
+       /*
+               Test when some pods have already been selected for deletion
+       */
+
+       // Normal inputs
+       maxshardReplicasUnavailable = intstr.FromInt(1)
+       podsToUpgrade = getPodNames(pickPodsToUpdate(solrCloud, 
someScheduledForDeletionPods, testHealthyClusterStatus, overseerLeader, 6, log))
+       assert.ElementsMatch(t, []string{}, podsToUpgrade, "Incorrect set of 
next pods to upgrade. Do to replica placement, only the node with the least 
leaders can be upgraded and replicas.")

Review Comment:
   ```suggestion
        assert.ElementsMatch(t, []string{}, podsToUpgrade, "Incorrect set of 
next pods to upgrade. Due to replica placement, only the node with the least 
leaders can be upgraded and replicas.")
   ```



-- 
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