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>
|
* <pre>
|
||||||
* class SomeIntegrationTest {
|
* class SomeIntegrationTest {
|
||||||
* @ClusterTest(brokers = 1, controllers = 1, clusterType = ClusterType.Both)
|
* @ClusterTest(brokers = 1, controllers = 1, types = {Type.KRAFT, Type.CO_KRAFT})
|
||||||
* def someTest(): Unit = {
|
* void someTest(ClusterInstance cluster) {
|
||||||
* assertTrue(condition)
|
* assertTrue(condition)
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </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.
|
* 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.
|
* A special system property "kafka.cluster.test.repeat" can be used to cause repeated invocation of the tests.
|
||||||
|
|
Loading…
Reference in New Issue