chia7712 commented on code in PR #20180:
URL: https://github.com/apache/kafka/pull/20180#discussion_r2274230694
##########
server/src/test/java/org/apache/kafka/network/SocketServerConfigsTest.java:
##########
@@ -36,7 +36,7 @@ public void testDefaultNameToSecurityProto() {
new ListenerName("SASL_PLAINTEXT"),
SecurityProtocol.SASL_PLAINTEXT,
new ListenerName("SASL_SSL"), SecurityProtocol.SASL_SSL
);
- assertEquals(expected,
SocketServerConfigs.DEFAULT_NAME_TO_SECURITY_PROTO);
+ assertEquals(SocketServerConfigs.DEFAULT_NAME_TO_SECURITY_PROTO,
expected);
Review Comment:
oh, that is poor naming. Perhaps, we could simplify the code as follows.
```java
assertEquals(Map.of(
new ListenerName("PLAINTEXT"), SecurityProtocol.PLAINTEXT,
new ListenerName("SSL"), SecurityProtocol.SSL,
new ListenerName("SASL_PLAINTEXT"),
SecurityProtocol.SASL_PLAINTEXT,
new ListenerName("SASL_SSL"), SecurityProtocol.SASL_SSL
), SocketServerConfigs.DEFAULT_NAME_TO_SECURITY_PROTO);
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]