You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ch...@apache.org on 2024/07/07 16:32:27 UTC
(kafka) branch trunk updated: MINOR: Wait all brokers to get ready (#16537)
This is an automated email from the ASF dual-hosted git repository.
chia7712 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 f0e0db1aad9 MINOR: Wait all brokers to get ready (#16537)
f0e0db1aad9 is described below
commit f0e0db1aad913142e3cead2e63af65b8b7725bd9
Author: TaiJuWu <tj...@gmail.com>
AuthorDate: Mon Jul 8 00:32:21 2024 +0800
MINOR: Wait all brokers to get ready (#16537)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com
---
core/src/test/java/kafka/test/junit/RaftClusterInvocationContext.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/core/src/test/java/kafka/test/junit/RaftClusterInvocationContext.java b/core/src/test/java/kafka/test/junit/RaftClusterInvocationContext.java
index 9234323d6fe..e582cefaecc 100644
--- a/core/src/test/java/kafka/test/junit/RaftClusterInvocationContext.java
+++ b/core/src/test/java/kafka/test/junit/RaftClusterInvocationContext.java
@@ -189,7 +189,9 @@ public class RaftClusterInvocationContext implements TestTemplateInvocationConte
if (started.compareAndSet(false, true)) {
clusterTestKit.startup();
kafka.utils.TestUtils.waitUntilTrue(
- () -> this.clusterTestKit.brokers().get(0).brokerState() == BrokerState.RUNNING,
+ () -> this.clusterTestKit.brokers().values().stream().allMatch(
+ brokers -> brokers.brokerState() == BrokerState.RUNNING
+ ),
() -> "Broker never made it to RUNNING state.",
org.apache.kafka.test.TestUtils.DEFAULT_MAX_WAIT_MS,
100L);