cameronlee314 commented on a change in pull request #951: SAMZA-2127: Upgrade to Kafka 2.0 URL: https://github.com/apache/samza/pull/951#discussion_r267885428
########## File path: samza-test/src/test/scala/org/apache/samza/test/integration/StreamTaskTestUtil.scala ########## @@ -133,43 +130,36 @@ object StreamTaskTestUtil { config.put(ProducerConfig.LINGER_MS_CONFIG, "0") val producerConfig = new KafkaProducerConfig("kafka", "i001", config) + adminClient = AdminClient.create(config.asInstanceOf[util.Map[String, Object]]) producer = new KafkaProducer[Array[Byte], Array[Byte]](producerConfig.getProducerProperties) createTopics validateTopics } def createTopics { - AdminUtils.createTopic( - zkUtils, - INPUT_TOPIC, - TOTAL_TASK_NAMES, - REPLICATION_FACTOR) + adminClient.createTopics(Collections.singleton(new NewTopic(INPUT_TOPIC, TOTAL_TASK_NAMES, REPLICATION_FACTOR.shortValue()))) } def validateTopics { Review comment: Not sure if this is feasible/practical to combine, but it looks like some of this code is similar to code from `TestKafkaSystemAdmin`, such as `validateTopics`. ---------------------------------------------------------------- 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 With regards, Apache Git Services