Chris Egerton created KAFKA-16935: ------------------------------------- Summary: Automatically wait for cluster startup in embedded Connect integration tests Key: KAFKA-16935 URL: https://issues.apache.org/jira/browse/KAFKA-16935 Project: Kafka Issue Type: Improvement Affects Versions: 3.8.0 Reporter: Chris Egerton Assignee: Chris Egerton
It's a common idiom in our integration tests to [start an embedded Kafka and Connect cluster|https://github.com/apache/kafka/blob/aecaf4447561edd8da9f06e3abdf46f382dc9d89/connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedConnect.java#L120-L135] and then immediately afterwards [wait for each worker in the Connect cluster to complete startup|https://github.com/apache/kafka/blob/aecaf4447561edd8da9f06e3abdf46f382dc9d89/connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/ConnectAssertions.java#L62-L92]. Separating these two actions into separate steps makes our tests lengthier and can even lead to bugs and flakiness if the second step is accidentally omitted (see [https://github.com/apache/kafka/pull/16286] for one example). Instead, we should default to automatically awaiting the complete startup of every worker in an embedded Connect cluster when {{EmbeddedConnect::start}} is invoked, and require callers to opt out if they do not want to automatically wait for startup to complete when invoking that method. -- This message was sent by Atlassian Jira (v8.20.10#820010)