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:
Logan Zhu 2025-09-13 06:01:00 +08:00 committed by GitHub
parent af2a8db3c6
commit 026710cbb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -78,14 +78,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*
* <pre>
* class SomeIntegrationTest {
* &#64;ClusterTest(brokers = 1, controllers = 1, clusterType = ClusterType.Both)
* def someTest(): Unit = {
* &#64;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.