sjhajharia commented on code in PR #20096:
URL: https://github.com/apache/kafka/pull/20096#discussion_r2252814674


##########
tools/src/test/java/org/apache/kafka/tools/TopicCommandTest.java:
##########
@@ -257,7 +257,7 @@ public void 
testCreateTopicDoesNotRetryThrottlingQuotaExceededException() {
             })));
 
         NewTopic expectedNewTopic = new NewTopic(topicName, Optional.empty(), 
Optional.empty())
-                .configs(Collections.emptyMap());
+                .configs(Map.of());

Review Comment:
   Thats not true for this case. Removal of the 
`.config(Collections.emptyMap())` causes the test to fail due to the verify() 
method following the same.
   Here is the stack trace:
   
   ```
   Argument(s) are different! Wanted:
   admin.createTopics(
       [(name=topicName, numPartitions=default, replicationFactor=default, 
replicasAssignments=null, configs=null)],
       <custom argument matcher>
   );
   -> at 
org.apache.kafka.tools.TopicCommandTest.testCreateTopicDoesNotRetryThrottlingQuotaExceededException(TopicCommandTest.java:261)
   Actual invocations have different arguments at position [0]:
   admin.createTopics(
       [(name=topicName, numPartitions=default, replicationFactor=default, 
replicasAssignments=null, configs={})],
       org.apache.kafka.clients.admin.CreateTopicsOptions@77524ca7
   );
   ```



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to