KAFKA-16239: Clean up references to non-existent IntegrationTestHelper (#15352)

Co-authored-by: ghostspiders <yufeng.gao@seres.cn>

Reviewers: Divij Vaidya <diviv@amazon.com>
This commit is contained in:
ghostspiders 2024-02-12 20:27:47 +08:00 committed by GitHub
parent fc8b644e56
commit 5cfcc52fb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 0 additions and 20 deletions

View File

@ -105,7 +105,6 @@
<allow pkg="kafka.server"/>
<allow pkg="kafka.zk" />
<allow pkg="org.apache.kafka.clients.admin"/>
<allow pkg="integration.kafka.server" class="IntegrationTestHelper"/>
<subpackage name="annotation">
<allow pkg="kafka.test"/>
</subpackage>

View File

@ -107,7 +107,6 @@ previously garnered from the test hierarchy.
* ClusterConfig: a mutable cluster configuration, includes cluster type, number of brokers, properties, etc
* ClusterInstance: a shim to the underlying class that actually runs the cluster, provides access to things like SocketServers
* IntegrationTestHelper: connection related functions taken from IntegrationTestHarness and BaseRequestTest
In order to have one of these objects injected, simply add it as a parameter to your test class, `@BeforeEach` method, or test method.
@ -115,23 +114,7 @@ In order to have one of these objects injected, simply add it as a parameter to
| --- | --- | --- | --- | --- |
| ClusterConfig | yes | yes | yes* | Once in the test, changing config has no effect |
| ClusterInstance | yes* | no | yes | Injectable at class level for convenience, can only be accessed inside test |
| IntegrationTestHelper | yes | yes | yes | - |
```scala
@ExtendWith(value = Array(classOf[ClusterTestExtensions]))
class SomeTestClass(helper: IntegrationTestHelper) {
@BeforeEach
def setup(config: ClusterConfig): Unit = {
config.serverProperties().put("foo", "bar")
}
@ClusterTest
def testSomething(cluster: ClusterInstance): Unit = {
val topics = cluster.createAdminClient().listTopics()
}
}
```
# Gotchas
* Test methods annotated with JUnit's `@Test` will still be run, but no cluster will be started and no dependency

View File

@ -59,7 +59,6 @@ import java.util.stream.Stream;
* <ul>
* <li>ClusterConfig (the same instance passed to the constructor)</li>
* <li>ClusterInstance (includes methods to expose underlying SocketServer-s)</li>
* <li>IntegrationTestHelper (helper methods)</li>
* </ul>
*/
public class RaftClusterInvocationContext implements TestTemplateInvocationContext {

View File

@ -61,7 +61,6 @@ import java.util.stream.Stream;
* <ul>
* <li>ClusterConfig (the same instance passed to the constructor)</li>
* <li>ClusterInstance (includes methods to expose underlying SocketServer-s)</li>
* <li>IntegrationTestHelper (helper methods)</li>
* </ul>
*/
public class ZkClusterInvocationContext implements TestTemplateInvocationContext {