C0urante commented on code in PR #16253:
URL: https://github.com/apache/kafka/pull/16253#discussion_r1633380015


##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/distributed/IncrementalCooperativeAssignorTest.java:
##########
@@ -1507,26 +1544,24 @@ private List<Integer> 
allocations(Function<ConnectorsAndTasks, ? extends Collect
 
     private void assertNoRevocations() {
         returnedAssignments.newlyRevokedConnectors().forEach((worker, 
revocations) ->
-                assertEquals(
-                        "Expected no revocations to take place during this 
round, but connector revocations were issued for worker " + worker,
-                        Collections.emptySet(),
-                        new HashSet<>(revocations)
+                assertTrue(
+                        revocations.isEmpty(),
+                        "Expected no revocations to take place during this 
round, but connector revocations were issued for worker " + worker

Review Comment:
   IMO we should continue asserting that the collection is equal to an empty 
set here, since if the assertion fails we get more information that way. This 
is especially useful when writing new unit tests for this logic and can help 
save time and headaches during that process.



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

Reply via email to