coltmcnealy-lh commented on code in PR #17527: URL: https://github.com/apache/kafka/pull/17527#discussion_r1835767677
########## clients/src/test/java/org/apache/kafka/clients/producer/internals/SenderTest.java: ########## @@ -567,6 +567,44 @@ public void testMetadataTopicExpiry() throws Exception { assertTrue(future.isDone(), "Request should be completed"); } + @Test + public void senderThreadShouldNotGetStuckWhenThrottledAndAddingPartitionsToTxn() { + // We want MockClient#poll() to advance time so that eventually the backoff expires. + client.setAdvanceTimeDuringPoll(true); Review Comment: I tried that. However, the problem is that the thing we want to test is not how many times we call `time.milliseconds()` but rather what values are passed into `NetworkClient#poll()`. I wasn't able to find a way to use this strategy to get a test that failed on `trunk` and passed on my branch. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org