ijuma commented on a change in pull request #11295: URL: https://github.com/apache/kafka/pull/11295#discussion_r702929731
########## File path: core/src/test/scala/unit/kafka/zk/KafkaZkClientTest.scala ########## @@ -1340,6 +1343,32 @@ class KafkaZkClientTest extends ZooKeeperTestHarness { assertEquals(ZooDefs.Ids.READ_ACL_UNSAFE.asScala, zkClient.getAcl(mockPath)) } + @Test + def testJuteMaxBufffer(): Unit = { + // default case + assertEquals("4194304", zkClient.currentZooKeeper.getClientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER)) + + // Value set directly on ZKClientConfig takes precedence over system property + System.setProperty(ZKConfig.JUTE_MAXBUFFER, (3000 * 1024).toString) + try { + val clientConfig1 = new ZKClientConfig + clientConfig1.setProperty(ZKConfig.JUTE_MAXBUFFER, (2000 * 1024).toString) + val client1 = KafkaZkClient(zkConnect, zkAclsEnabled.getOrElse(JaasUtils.isZkSaslEnabled), zkSessionTimeout, + zkConnectionTimeout, zkMaxInFlightRequests, Time.SYSTEM, name = "KafkaZkClient", + zkClientConfig = clientConfig1) + try assertEquals("2048000", client1.currentZooKeeper.getClientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER)) + finally client1.close() Review comment: That's a fair suggestion, I pushed a change along these lines. -- 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