[
https://issues.apache.org/jira/browse/KAFKA-16482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17835005#comment-17835005
]
Chia-Ping Tsai commented on KAFKA-16482:
----------------------------------------
I'm a big confused that should we encourage developers to set configs for all
test case by modifying `ClusterConfig` in `BeforeEach` phase? it seems to me
that we allow to inject `ClusterConfig` in everywhere, and so it is hard to be
keenly aware of "Do those changes have effect on the cluster"?
Personally, I prefer to set configs for all test cases by `ClusterTestDefaults`
(this function is not implemented). And individual configs of test case can be
changed by `ClusterTest`.
I'd want to disable to inject `ClusterConfig`. However, maybe there are some
test cases that they need a lot of "if-else" to define the configs rather than
just pass "constants".
[~davidarthur] WDYT?
> Eliminate the IDE warnings of accepting ClusterConfig in BeforeEach
> -------------------------------------------------------------------
>
> Key: KAFKA-16482
> URL: https://issues.apache.org/jira/browse/KAFKA-16482
> Project: Kafka
> Issue Type: Test
> Reporter: Chia-Ping Tsai
> Assignee: Cheng-Kai, Zhang
> Priority: Major
>
> IDE does not like the code style, and we can leverage `ClusterConfigProperty`
> to eliminate the false error from IDE
>
> [https://github.com/apache/kafka/blob/trunk/core/src/test/scala/integration/kafka/coordinator/transaction/ProducerIdsIntegrationTest.scala#L42]
> [https://github.com/apache/kafka/blob/trunk/tools/src/test/java/org/apache/kafka/tools/LeaderElectionCommandTest.java#L75]
>
> https://github.com/apache/kafka/blob/trunk/tools/src/test/java/org/apache/kafka/tools/GetOffsetShellTest.java#L68
--
This message was sent by Atlassian Jira
(v8.20.10#820010)