Nikita-Shupletsov commented on code in PR #21586:
URL: https://github.com/apache/kafka/pull/21586#discussion_r2881077313


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/WakeupTriggerTest.java:
##########
@@ -219,6 +219,39 @@ public void 
testExceptionTriggeredWhenTaskAsynchronouslyCancelled() {
         assertThrows(WakeupException.class, () -> 
wakeupTrigger.maybeTriggerWakeup());
     }
 
+    @Test
+    public void 
testExceptionTriggeredWhenTaskAsynchronouslyCompletedBeforeSet() {
+        final CompletableFuture<Void> task = new CompletableFuture<>();
+        task.complete(null);
+        wakeupTrigger.wakeup();

Review Comment:
   when we call wakeup, it sets a WakeupFuture into the pending task. which we 
need.
   so, completing the future and waking up are the preconditions to reproduce 
the issue. and then if we call setActiveTask we want to verify that if there is 
a WakeupFuture and the currentTask is completed already, we don't lose the 
WakeupFuture



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