[
https://issues.apache.org/jira/browse/KAFKA-16482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17834745#comment-17834745
]
Chia-Ping Tsai commented on KAFKA-16482:
----------------------------------------
BTW, we can eliminate the IDE error by updating configs of non-started cluster
instance. for example: LeaderElectionCommandTest
{color:#b3ae60}@BeforeEach
{color}{color:#cf8e6d}void {color}{color:#56a8f5}setup{color}() {
TestUtils.verifyNoUnexpectedThreads({color:#6aab73}"@BeforeEach"{color});
{color:#c77dbb}cluster{color}.config().serverProperties().put({color:#6aab73}"auto.leader.rebalance.enable"{color},
{color:#6aab73}"false"{color});
{color:#c77dbb}cluster{color}.config().serverProperties().put({color:#6aab73}"controlled.shutdown.enable"{color},
{color:#6aab73}"true"{color});
{color:#c77dbb}cluster{color}.config().serverProperties().put({color:#6aab73}"controlled.shutdown.max.retries"{color},
{color:#6aab73}"1"{color});
{color:#c77dbb}cluster{color}.config().serverProperties().put({color:#6aab73}"controlled.shutdown.retry.backoff.ms"{color},
{color:#6aab73}"1000"{color});
{color:#c77dbb}cluster{color}.config().serverProperties().put({color:#6aab73}"offsets.topic.replication.factor"{color},
{color:#6aab73}"2"{color});
}
> Avoid changing ClusterConfig in `BeforeEach` phase
> --------------------------------------------------
>
> 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)