FrankYang0529 commented on code in PR #16982:
URL: https://github.com/apache/kafka/pull/16982#discussion_r1746944955
##########
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java:
##########
@@ -1053,12 +1053,20 @@ public void
testFetchStableOffsetThrowInCommitted(GroupProtocol groupProtocol) {
assertThrows(UnsupportedVersionException.class, () ->
setupThrowableConsumer(groupProtocol).committed(Collections.singleton(tp0)));
}
- // TODO: this test triggers a bug with the CONSUMER group protocol
implementation.
- // The bug will be investigated and fixed so this test can use both
group protocols.
@ParameterizedTest
- @EnumSource(value = GroupProtocol.class, names = "CLASSIC")
- public void testFetchStableOffsetThrowInPoll(GroupProtocol groupProtocol) {
- assertThrows(UnsupportedVersionException.class, () ->
setupThrowableConsumer(groupProtocol).poll(Duration.ZERO));
+ @EnumSource(GroupProtocol.class)
+ public void testFetchStableOffsetThrowInPoll(GroupProtocol groupProtocol)
throws InterruptedException {
+ setupThrowableConsumer(groupProtocol);
+ TestUtils.waitForCondition(() -> {
Review Comment:
Hi @lianetm, the `ApplicationEventProcessor#process(PollEvent)` only resets
timer for some request managers. Even if we use
`ApplicationEventHandler#addAndGet`, we still can't guarantee `runOnce` is
executed. We may need `ConsumerNetworkThread` to send a `BackgroundEvent` to
make sure the `runOnce` is happened. However, this approach may make the
process more complex. If we want to make this, we probably can create another
Jira to handle this. WDYT?
--
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]