Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2631,11 +2631,14 @@ private void testApiTimeout(int requestTimeoutMs,
// Wait for the request to be timed out before backing off
TestUtils.waitForCondition(() -> !env.kafkaClient().hasInFlightRequests(),
"Timed out waiting for inFlightRequests to be timed out");
time.sleep(retryBackoffMs);

// Since api timeout bound is not hit, AdminClient should retry
TestUtils.waitForCondition(() -> env.kafkaClient().hasInFlightRequests(),
"Timed out waiting for Metadata request to be sent");
TestUtils.waitForCondition(() -> {
boolean hasInflightRequests = env.kafkaClient().hasInFlightRequests();
if (!hasInflightRequests)
time.sleep(retryBackoffMs);
return hasInflightRequests;
}, "Timed out waiting for Metadata request to be sent");
time.sleep(requestTimeoutMs + 1);

TestUtils.assertFutureThrows(result.future, TimeoutException.class);
Expand Down