lianetm commented on code in PR #18735:
URL: https://github.com/apache/kafka/pull/18735#discussion_r1934327363


##########
clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java:
##########
@@ -1783,12 +1782,14 @@ public void 
testDescribeTopicsWithDescribeTopicPartitionsApiErrorHandling() thro
         }
     }
 
-    @Flaky("KAFKA-18441")
     @Test
     public void testAdminClientApisAuthenticationFailure() {
         Cluster cluster = mockBootstrapCluster();
         try (final AdminClientUnitTestEnv env = new 
AdminClientUnitTestEnv(Time.SYSTEM, cluster,
-                newStrMap(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG, 
"1000"))) {
+                newStrMap(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG, "1000",
+                    // The default "retry.backoff.ms" is 100. if following 
assertion can't finish in 100L,
+                    // the test will fail. Set it to 5000 to make sure the 
test can finish in time.
+                    AdminClientConfig.RETRY_BACKOFF_MS_CONFIG, "5000"))) {
             env.kafkaClient().setNodeApiVersions(NodeApiVersions.create());
             
env.kafkaClient().createPendingAuthenticationError(cluster.nodes().get(0),
                     TimeUnit.DAYS.toMillis(1));

Review Comment:
   interesting, seems to me the changes to `rebootstrap` for metadata shared 
above are maybe the ones behind this then (from nov 2024 btw). 
   
   
https://github.com/apache/kafka/blob/048dfeffd0b8dcda01ec8c4c6f110b9d60994b84/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java#L722-L730
   
   Even though the test is setting a 1 day backoff, that only makes the 
MockClient return null node as leastLoaded (and this will now trigger a new 
metadata request that I guess didn't trigger before the reboostrap logic) 



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

Reply via email to