mirror of https://github.com/apache/kafka.git
MINOR: update the test.api README.md (#17809)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
ed9cb08dfe
commit
9dc4fca066
|
@ -14,7 +14,10 @@ This annotation has fields for a set of cluster types and number of brokers, as
|
|||
Arbitrary server properties can also be provided in the annotation:
|
||||
|
||||
```java
|
||||
@ClusterTest(types = {Type.KRAFT}, securityProtocol = "PLAINTEXT", properties = {
|
||||
@ClusterTest(
|
||||
types = {Type.KRAFT},
|
||||
brokerSecurityProtocol = SecurityProtocol.PLAINTEXT,
|
||||
properties = {
|
||||
@ClusterProperty(key = "inter.broker.protocol.version", value = "2.7-IV2"),
|
||||
@ClusterProperty(key = "socket.send.buffer.bytes", value = "10240"),
|
||||
})
|
||||
|
@ -25,8 +28,8 @@ Multiple `@ClusterTest` annotations can be given to generate more than one test
|
|||
|
||||
```scala
|
||||
@ClusterTests(Array(
|
||||
@ClusterTest(securityProtocol = "PLAINTEXT"),
|
||||
@ClusterTest(securityProtocol = "SASL_PLAINTEXT")
|
||||
@ClusterTest(brokerSecurityProtocol = SecurityProtocol.PLAINTEXT),
|
||||
@ClusterTest(securityProtocol = SecurityProtocol.SASL_PLAINTEXT)
|
||||
))
|
||||
def testSomething(): Unit = { ... }
|
||||
```
|
||||
|
@ -51,12 +54,12 @@ static List<ClusterConfig> generateConfigs() {
|
|||
ClusterConfig config1 = ClusterConfig.defaultClusterBuilder()
|
||||
.name("Generated Test 1")
|
||||
.serverProperties(props1)
|
||||
.ibp("2.7-IV1")
|
||||
.setMetadataVersion(MetadataVersion.IBP_2_7_IV1)
|
||||
.build();
|
||||
ClusterConfig config2 = ClusterConfig.defaultClusterBuilder()
|
||||
.name("Generated Test 2")
|
||||
.serverProperties(props2)
|
||||
.ibp("2.7-IV2")
|
||||
.setMetadataVersion(MetadataVersion.IBP_2_7_IV2)
|
||||
.build();
|
||||
ClusterConfig config3 = ClusterConfig.defaultClusterBuilder()
|
||||
.name("Generated Test 3")
|
||||
|
|
Loading…
Reference in New Issue