chia7712 commented on code in PR #17217:
URL: https://github.com/apache/kafka/pull/17217#discussion_r1777589888
##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClientTest.java:
##########
@@ -279,16 +279,13 @@ public void testFutureCompletionOutsidePoll() throws
Exception {
// Sleep a little so that t1 is blocking in poll
Thread.sleep(50);
- Thread t2 = new Thread(() -> consumerClient.poll(future));
- t2.start();
-
- // Sleep a little so that t2 is awaiting the network client lock
- Thread.sleep(50);
-
// Simulate a network response and return from the poll in t1
client.respond(heartbeatResponse(Errors.NONE));
client.wakeup();
+ Thread t2 = new Thread(() -> consumerClient.poll(future));
Review Comment:
What if `t1` call wakeup before starting the `t2`?
--
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]