majialoong commented on code in PR #23428:
URL: https://github.com/apache/kafka/pull/23428#discussion_r3999561176


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/RepartitionOptimizingTest.java:
##########
@@ -214,14 +209,14 @@ private void runTest(final String optimizationConfig, 
final int expectedNumberRe
         assertEquals(expectedNumberRepartitionTopics, 
getCountOfRepartitionTopicsFound(topologyString));
 
         // Verify the values collected by the processor
-        assertThat(3, equalTo(processorValueCollector.size()));
-        assertThat(processorValueCollector, 
equalTo(expectedCollectedProcessorValues));
+        assertEquals(3, processorValueCollector.size());
+        assertEquals(expectedCollectedProcessorValues, 
processorValueCollector);
 
         // Verify the expected output
-        assertThat(countOutputTopic.readKeyValuesToMap(), 
equalTo(keyValueListToMap(expectedCountKeyValues)));
-        assertThat(aggregationOutputTopic.readKeyValuesToMap(), 
equalTo(keyValueListToMap(expectedAggKeyValues)));
-        assertThat(reduceOutputTopic.readKeyValuesToMap(), 
equalTo(keyValueListToMap(expectedReduceKeyValues)));
-        assertThat(joinedOutputTopic.readKeyValuesToMap(), 
equalTo(keyValueListToMap(expectedJoinKeyValues)));
+        assertEquals(expectedCountKeyValues, 
countOutputTopic.readKeyValuesToMap());
+        assertEquals(expectedAggKeyValues, 
aggregationOutputTopic.readKeyValuesToMap());
+        assertEquals(expectedReduceKeyValues, 
reduceOutputTopic.readKeyValuesToMap());
+        assertEquals(keyValueListToMap(expectedJoinKeyValues), 
joinedOutputTopic.readKeyValuesToMap());

Review Comment:
   Thanks for the review! 
   
   I initially kept the list to minimize changes because its duplicate keys 
prevent a direct replacement with `Map.of`. 
   
   After looking through the history, it seems the test previously checked 
multiple records but now only compares the final map. I’ve updated it to use 
`Map.of`.



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