kirktrue commented on code in PR #21586:
URL: https://github.com/apache/kafka/pull/21586#discussion_r2881027524


##########
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:
   This call to `wakeup()` is not expected to have an effect, right? Is it just 
to provide a sanity check?



##########
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:
   Same goes for the other test methods.



##########
tools/src/main/java/org/apache/kafka/tools/VerifiableConsumer.java:
##########
@@ -295,6 +298,14 @@ public String name() {
         }
     }
 
+    private static class ShutdownRequested extends ConsumerEvent {
+
+        @Override
+        public String name() {
+            return "shutdown_requested";

Review Comment:
   Could we call out that fact in a comment? Or we could add some simple 
debug/stub code to `verifiable_consumer.py` so that it's printed in the system 
test output?



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