dino2895 opened a new pull request, #23181:
URL: https://github.com/apache/kafka/pull/23181

   ## Summary
   
   Fixes [KAFKA-18771](https://issues.apache.org/jira/browse/KAFKA-18771).
   
   `KRaftClusterTest.testDescribeQuorumRequestToControllers` may receive the 
previous quorum leader from an in-flight `describeMetadataQuorum` request 
before the new leader state becomes visible. The test previously asserted 
immediately that the leader had changed, causing intermittent failures.
   
   If the initial response still contains the previous leader, this change 
retries `describeMetadataQuorum` until the newly elected leader is observed or 
the wait times out.
   
   The retry behavior for transient `NOT_LEADER_OR_FOLLOWER` errors is already 
covered by `KafkaAdminClientTest.testDescribeMetadataQuorumRetriableError`.
   
   ## Testing
   
   ```shell
   ./gradlew :server:integrationTest \
     --tests 
org.apache.kafka.server.KRaftClusterTest.testDescribeQuorumRequestToControllers
   ./gradlew :server:spotlessJavaCheck :server:checkstyleTest


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