m1a2st commented on code in PR #20334:
URL: https://github.com/apache/kafka/pull/20334#discussion_r2326391978
##########
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java:
##########
@@ -716,26 +716,27 @@ public void testInterceptorConstructorClose(GroupProtocol
groupProtocol) {
@ParameterizedTest
@EnumSource(GroupProtocol.class)
public void
testInterceptorConstructorConfigurationWithExceptionShouldCloseRemainingInstances(GroupProtocol
groupProtocol) {
- final int targetInterceptor = 3;
+ final int targetInterceptor = 1;
try {
Properties props = new Properties();
props.setProperty(ConsumerConfig.GROUP_PROTOCOL_CONFIG,
groupProtocol.name());
props.setProperty(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,
"localhost:9999");
- props.setProperty(ConsumerConfig.INTERCEPTOR_CLASSES_CONFIG,
MockConsumerInterceptor.class.getName() + ", "
- + MockConsumerInterceptor.class.getName() + ", "
- + MockConsumerInterceptor.class.getName());
+ props.setProperty(ConsumerConfig.INTERCEPTOR_CLASSES_CONFIG,
+ CloseInterceptor.class.getName() + "," +
MockConsumerInterceptor.class.getName());
MockConsumerInterceptor.setThrowOnConfigExceptionThreshold(targetInterceptor);
assertThrows(KafkaException.class, () -> newConsumer(
props, new StringDeserializer(), new
StringDeserializer()));
- assertEquals(3, MockConsumerInterceptor.CONFIG_COUNT.get());
- assertEquals(3, MockConsumerInterceptor.CLOSE_COUNT.get());
+ assertEquals(1, MockConsumerInterceptor.CONFIG_COUNT.get());
+ assertEquals(1, MockConsumerInterceptor.CLOSE_COUNT.get());
+ assertEquals(1, CloseInterceptor.CLOSE_COUNT.get());
Review Comment:
Yes, this is an existing issue, I can file a Jira issue to trace 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]