gnodet-bot commented on code in PR #30342:
URL: https://github.com/apache/camel/pull/30342#discussion_r4614613025


##########
components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaConsumerGroupInstanceIdIT.java:
##########
@@ -72,7 +73,9 @@ public void configure() {
             }
         });
 
+        // the group does not exist until the first consumer has joined it: 
describing it fails with GroupIdNotFoundException
         await().atMost(60, TimeUnit.SECONDS)
+                .ignoreException(ExecutionException.class)

Review Comment:
   ⚠️ **Medium — overly broad exception suppression:** 
`.ignoreException(ExecutionException.class)` suppresses *all* 
`ExecutionException`s thrown during the await window. While 
`GroupIdNotFoundException` (the target) is always wrapped in 
`ExecutionException` by the Kafka AdminClient, so are other failures — a 
misconfigured broker, auth errors, or a quota violation would all silently 
retry until the 60-second timeout expires rather than failing immediately.
   
   Consider narrowing to the specific root cause:
   
   ```suggestion
                   .ignoreExceptionsMatching(e -> e instanceof 
ExecutionException
                           && e.getCause() instanceof 
org.apache.kafka.common.errors.GroupIdNotFoundException)
   ```
   
   This is a test-only change and the 60-second bound provides a safety net 
regardless, so this is a refinement rather than a blocker. But if the test ever 
starts masking real setup failures, this specificity makes debugging easier.



-- 
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]

Reply via email to