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


##########
metadata/src/test/java/org/apache/kafka/metadata/storage/FormatterTest.java:
##########
@@ -180,14 +180,16 @@ public void testIgnoreFormatted() throws Exception {
         try (TestEnv testEnv = new TestEnv(1)) {
             FormatterContext formatter1 = testEnv.newFormatter();
             formatter1.formatter.run();
-            assertEquals("Formatting metadata directory " + 
testEnv.directory(0) +
-                " with metadata.version " + MetadataVersion.latestProduction() 
+ ".",
-                    formatter1.output().trim());
+            assertEquals("Bootstrap metadata: " + 
formatter1.formatter.bootstrapMetadata() +
+                    "\nFormatting metadata directory " + testEnv.directory(0) +
+                    " with metadata.version " + 
MetadataVersion.latestProduction() + ".",
+                formatter1.output().trim());
 
             FormatterContext formatter2 = testEnv.newFormatter();
             formatter2.formatter.setIgnoreFormatted(true);
             formatter2.formatter.run();
-            assertEquals("All of the log directories are already formatted.",
+            assertEquals("Bootstrap metadata: " + 
formatter2.formatter.bootstrapMetadata() +

Review Comment:
   Makes sense. I was also considering the same. 
   I have now moved the print line to the `doFormat` method now only in the 
case when actual formatting takes place. Thus in cases when the dirs are 
already formatted, we wont print the same. Could you pls check if that makes 
sense?
   



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