omkreddy commented on a change in pull request #8184:
URL: https://github.com/apache/kafka/pull/8184#discussion_r415020856



##########
File path: core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala
##########
@@ -424,12 +483,33 @@ class ConfigCommandTest extends ZooKeeperTestHarness with 
Logging {
 
   @Test
   def shouldAlterTopicConfig(): Unit = {
+    doShouldAlterTopicConfig(false)
+  }
+
+  @Test
+  def shouldAlterTopicConfigFile(): Unit = {
+    doShouldAlterTopicConfig(true)
+  }
+
+  def doShouldAlterTopicConfig(file: Boolean): Unit = {
+    var filePath = ""
+    val addedConfigs = Seq("delete.retention.ms=1000000", 
"min.insync.replicas=2")
+    if (file) {
+      val file = 
File.createTempFile("testParseConfigsToBeAddedForAddConfigFile", ".properties")

Review comment:
       => TestUtils.tempFile(). 
   
   We can also add a new util method  `TestUtils.tempFile(String data)` and use 
at both the places (line: 265 and here). 




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

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


Reply via email to