sodonnel commented on code in PR #4014:
URL: https://github.com/apache/ozone/pull/4014#discussion_r1064597952


##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/TestSCMCommonPlacementPolicy.java:
##########
@@ -306,8 +306,7 @@ public void testReplicasToRemoveWithOneOverreplication() {
     Set<ContainerReplica> replicasToRemove = dummyPlacementPolicy
             .replicasToRemoveToFixOverreplication(replicas, 1);
     Assertions.assertEquals(replicasToRemove.size(), 1);
-    Assertions.assertEquals(replicasToRemove.stream().findFirst().get(),
-            replica);
+    Assertions.assertEquals(replicasToRemove.toArray()[0], replica);

Review Comment:
   Ah, I missed that replicasToRemove was a set and not a list. In that case, I 
guess your original code is probably as good as this new version.



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