gongxuanzhang commented on code in PR #16010:
URL: https://github.com/apache/kafka/pull/16010#discussion_r1615404002


##########
core/src/test/scala/unit/kafka/tools/StorageToolTest.scala:
##########
@@ -206,12 +206,20 @@ Found problem:
 
   @Test
   def testFormatSucceedsIfAllDirectoriesAreAvailable(): Unit = {
-    val availableDir1 = TestUtils.tempDir()
-    val availableDir2 = TestUtils.tempDir()
+    val availableDirs = Seq(TestUtils.tempDir(), TestUtils.tempDir(), 
TestUtils.tempDir()).map(dir => dir.toString)
     val stream = new ByteArrayOutputStream()
-    assertEquals(0, runFormatCommand(stream, Seq(availableDir1.toString, 
availableDir2.toString)))
-    assertTrue(stream.toString().contains("Formatting 
%s".format(availableDir1)))
-    assertTrue(stream.toString().contains("Formatting 
%s".format(availableDir2)))
+    assertEquals(0, runFormatCommand(stream, availableDirs))

Review Comment:
   I tweaked it a little bit, made a two-way guarantee
   @chia7712 



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