You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/12/02 15:50:16 UTC

[GitHub] [kafka] dajac commented on a diff in pull request #12175: KAFKA-14146: Config file option for MessageReader/MessageFormatter in ConsoleProducer/ConsoleConsumer (KIP-840)

dajac commented on code in PR #12175:
URL: https://github.com/apache/kafka/pull/12175#discussion_r1038279577


##########
core/src/test/scala/unit/kafka/tools/ConsoleConsumerTest.scala:
##########
@@ -488,6 +488,31 @@ class ConsoleConsumerTest {
     assertTrue(formatter.keyDeserializer.get.asInstanceOf[MockDeserializer].isKey)
   }
 
+  @Test
+  def testCustomConfigShouldBePassedToConfigureMethod(): Unit = {
+    val propsFile = TestUtils.tempFile()
+    val propsStream = Files.newOutputStream(propsFile.toPath)
+    propsStream.write("key.deserializer.my-props=abc\n".getBytes())
+    propsStream.write("print.key=false".getBytes())
+    propsStream.close()

Review Comment:
   I would rather prefer to have something like `TestUtils.tempPropertyFile(Map("parse.key" -> "true", "key.separator" -> "|")`. However, we can do this in a separate PR.



-- 
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-unsubscribe@kafka.apache.org

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