This is an automated email from the ASF dual-hosted git repository. jgus pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push: new a701c0e04fb MINOR: Fix flaky `DescribeClusterRequestTest.testDescribeClusterRequestIncludingClusterAuthorizedOperations` (#14890) a701c0e04fb is described below commit a701c0e04fbe9d570f5a8c3a46d2e6bbe42619a5 Author: Jason Gustafson <ja...@confluent.io> AuthorDate: Fri Dec 1 09:33:17 2023 -0800 MINOR: Fix flaky `DescribeClusterRequestTest.testDescribeClusterRequestIncludingClusterAuthorizedOperations` (#14890) Test startup does not assure that all brokers are registered. In flaky failures, the `DescribeCluster` API does not return a complete list of brokers. To fix the issue, we add a call to `ensureConsistentKRaftMetadata()` to ensure that all brokers are registered and have caught up to current metadata. Reviewers: David Jacot <dja...@confluent.io> --- core/src/test/scala/unit/kafka/server/DescribeClusterRequestTest.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/test/scala/unit/kafka/server/DescribeClusterRequestTest.scala b/core/src/test/scala/unit/kafka/server/DescribeClusterRequestTest.scala index 7c260dae853..acb0a215b19 100644 --- a/core/src/test/scala/unit/kafka/server/DescribeClusterRequestTest.scala +++ b/core/src/test/scala/unit/kafka/server/DescribeClusterRequestTest.scala @@ -83,6 +83,8 @@ class DescribeClusterRequestTest extends BaseRequestTest { Int.MinValue } + ensureConsistentKRaftMetadata() + for (version <- ApiKeys.DESCRIBE_CLUSTER.oldestVersion to ApiKeys.DESCRIBE_CLUSTER.latestVersion) { val describeClusterRequest = new DescribeClusterRequest.Builder(new DescribeClusterRequestData() .setIncludeClusterAuthorizedOperations(includeClusterAuthorizedOperations))