KAFKA-13648: KRaft ClusterInstance does not allow for deferred start

2022-08-02 Thread Sayed Mohammad Hossein Torabi
Dear Commiters,

Could you please Review this PR? https://github.com/apache/kafka/pull/12400
This PR, fixes the bug regarding Cluster Annotation in the tests and helps
the migration to Cluster annotation.

Kind regards,
Hossein Torabi


[jira] [Created] (KAFKA-13648) KRaft ClusterInstance does not allow for deferred start

2022-02-07 Thread David Arthur (Jira)
David Arthur created KAFKA-13648:


 Summary: KRaft ClusterInstance does not allow for deferred start
 Key: KAFKA-13648
 URL: https://issues.apache.org/jira/browse/KAFKA-13648
 Project: Kafka
  Issue Type: Bug
  Components: unit tests
Reporter: David Arthur


In our JUnit testkit extension, we allow for a cluster to be started explicitly 
in the test by annotating a test with AutoStart.NO. This allows for additional 
configuration or setup to be done in the test method before starting the 
cluster. For example:


{code:java}
@ClusterTest(clusterType = Type.ZK, brokers = 3, autoStart = AutoStart.NO)
public void testSomething(ClusterInstance clusterInstance) {
clusterInstance.config().serverProperties().put("foo", "bar")
clusterInstance.start();
// ...
}
{code}

This works fine for ZK clusters, but is broken for KRaft clusters. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)