Skip to content

Commit

Permalink
Wait all brokers to start running
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiJuWu committed Jun 22, 2024
1 parent 9433123 commit 4583d28
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ public void start() {
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);
Expand Down

0 comments on commit 4583d28

Please sign in to comment.