@@ -14,9 +14,12 @@ This annotation has fields for a set of cluster types and number of brokers, as
14
14
Arbitrary server properties can also be provided in the annotation:
15
15
16
16
``` java
17
- @ClusterTest (types = {Type . KRAFT }, securityProtocol = " PLAINTEXT" , properties = {
18
- @ClusterProperty (key = " inter.broker.protocol.version" , value = " 2.7-IV2" ),
19
- @ClusterProperty (key = " socket.send.buffer.bytes" , value = " 10240" ),
17
+ @ClusterTest (
18
+ types = {Type . KRAFT },
19
+ brokerSecurityProtocol = SecurityProtocol . PLAINTEXT ,
20
+ properties = {
21
+ @ClusterProperty (key = " inter.broker.protocol.version" , value = " 2.7-IV2" ),
22
+ @ClusterProperty (key = " socket.send.buffer.bytes" , value = " 10240" ),
20
23
})
21
24
void testSomething() { ... }
22
25
```
@@ -25,8 +28,8 @@ Multiple `@ClusterTest` annotations can be given to generate more than one test
25
28
26
29
``` scala
27
30
@ ClusterTests (Array (
28
- @ ClusterTest (securityProtocol = " PLAINTEXT" ),
29
- @ ClusterTest (securityProtocol = " SASL_PLAINTEXT" )
31
+ @ ClusterTest (brokerSecurityProtocol = SecurityProtocol . PLAINTEXT ),
32
+ @ ClusterTest (securityProtocol = SecurityProtocol . SASL_PLAINTEXT )
30
33
))
31
34
def testSomething (): Unit = { ... }
32
35
```
@@ -45,18 +48,18 @@ produce any number of test configurations using a fluent builder style API.
45
48
import java.util.Arrays ;
46
49
47
50
@ClusterTemplate (" generateConfigs" )
48
- void testSomething() { ... }
51
+ void testSomething() { ... }
49
52
50
53
static List<ClusterConfig > generateConfigs() {
51
54
ClusterConfig config1 = ClusterConfig . defaultClusterBuilder()
52
55
.name(" Generated Test 1" )
53
56
.serverProperties(props1)
54
- .ibp( " 2.7-IV1 " )
57
+ .setMetadataVersion( MetadataVersion . IBP_2_7_IV1 )
55
58
.build();
56
59
ClusterConfig config2 = ClusterConfig . defaultClusterBuilder()
57
60
.name(" Generated Test 2" )
58
61
.serverProperties(props2)
59
- .ibp( " 2.7-IV2 " )
62
+ .setMetadataVersion( MetadataVersion . IBP_2_7_IV2 )
60
63
.build();
61
64
ClusterConfig config3 = ClusterConfig . defaultClusterBuilder()
62
65
.name(" Generated Test 3" )
0 commit comments