mirror of https://github.com/apache/kafka.git
MINOR: Update ClusterTestExtensions Javadoc example (#20525)
The previous Javadoc example used the deprecated ClusterType. It is now updated to use `types = {Type.KRAFT, Type.CO_KRAFT}` Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
af2a8db3c6
commit
026710cbb4
|
@ -78,14 +78,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
*
|
||||
* <pre>
|
||||
* class SomeIntegrationTest {
|
||||
* @ClusterTest(brokers = 1, controllers = 1, clusterType = ClusterType.Both)
|
||||
* def someTest(): Unit = {
|
||||
* @ClusterTest(brokers = 1, controllers = 1, types = {Type.KRAFT, Type.CO_KRAFT})
|
||||
* void someTest(ClusterInstance cluster) {
|
||||
* assertTrue(condition)
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* will generate two invocations of "someTest" (since ClusterType.Both was given). For each invocation, the test class
|
||||
* will generate two invocations of "someTest" (since two cluster types were specified). For each invocation, the test class
|
||||
* SomeIntegrationTest will be instantiated, lifecycle methods (before/after) will be run, and "someTest" will be invoked.
|
||||
*
|
||||
* A special system property "kafka.cluster.test.repeat" can be used to cause repeated invocation of the tests.
|
||||
|
|
Loading…
Reference in New Issue