OmniaGM commented on code in PR #12577: URL: https://github.com/apache/kafka/pull/12577#discussion_r1008071035
########## connect/mirror/src/test/java/org/apache/kafka/connect/mirror/MirrorMakerConfigTest.java: ########## @@ -82,15 +84,17 @@ public void testClientConfigProperties() { "config.providers", "fake", "config.providers.fake.class", FakeConfigProvider.class.getName(), "replication.policy.separator", "__", - "ssl.truststore.password", "secret1", "ssl.key.password", "${fake:secret:password}", // resolves to "secret2" - "security.protocol", "SSL", - "a.security.protocol", "PLAINTEXT", + "security.protocol", "SSL", + "a.ssl.truststore.password", "secret1", Review Comment: The code already had `ssl.truststore.password` with `PLAINTEXT` before for both clusters `a` and `b`. https://github.com/apache/kafka/blob/6ab4d047d563e0fe42a7c0ed6f10ddecda135595/connect/mirror/src/test/java/org/apache/kafka/connect/mirror/MirrorMakerConfigTest.java#L85 ``` "ssl.truststore.password", "secret1", "ssl.key.password", "${fake:secret:password}", // resolves to "secret2" "security.protocol", "SSL", "a.security.protocol", "PLAINTEXT", ``` This set of configs is wrong anyway as it set `truststore.password` without a truststore and as you mentioned it has protocol as `PLAINTEXT`. And If we tried to initialise any client with these configs it fail with `org.apache.kafka.common.errors.InvalidConfigurationException: SSL trust store is not specified, but trust store password is specified.` However, `testClientConfigProperties` isn't testing if a set of configs are valid or not instead the test case is testing if the MM2 is loading configs prefixed by cluster alias. On the other side my test is trying to check if `bClientConfig.forwardingAdmin(bClientConfig.adminConfig())` is instance of `FakeForwardingAdmin` to do this I can't use the original configs that set`"ssl.truststore.password", "secret1",` to both clusters. So I just limited it to cluster `a` and kept the rest of the assertions in the test case https://github.com/apache/kafka/blob/6ab4d047d563e0fe42a7c0ed6f10ddecda135595/connect/mirror/src/test/java/org/apache/kafka/connect/mirror/MirrorMakerConfigTest.java#L112 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org