chia7712 commented on a change in pull request #9102: URL: https://github.com/apache/kafka/pull/9102#discussion_r475041700
########## File path: clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java ########## @@ -2511,4 +2511,39 @@ public void testEnforceRebalanceTriggersRebalanceOnNextPoll() { assertEquals(countingRebalanceListener.revokedCount, 1); } + + @Test + public void deserializerShouldSeeGeneratedConfigs() { + Properties props = new Properties(); + props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9999"); + props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, DeserializerForClientId.class.getName()); + props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, DeserializerForClientId.class.getName()); + + KafkaConsumer<byte[], byte[]> consumer = new KafkaConsumer<>(props); + + assertEquals(2, DeserializerForClientId.CLIENT_IDS.size()); + assertEquals(DeserializerForClientId.CLIENT_IDS.get(0), consumer.getClientId()); + assertEquals(DeserializerForClientId.CLIENT_IDS.get(1), consumer.getClientId()); + + assertEquals(2, DeserializerForClientId.AUTO_COMMIT_FLAGS.size()); + assertEquals(DeserializerForClientId.AUTO_COMMIT_FLAGS.get(0), consumer.isAutoCommitEnabled()); Review comment: @abbccdda thanks for suggestion. I have reverted it. ---------------------------------------------------------------- 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