chia7712 commented on code in PR #15715:
URL: https://github.com/apache/kafka/pull/15715#discussion_r1564305286
##########
core/src/test/java/kafka/test/junit/RaftClusterInvocationContext.java:
##########
@@ -99,6 +99,10 @@ public List<Extension> getAdditionalExtensions() {
clusterConfig.brokerServerProperties(brokerId).forEach(
(key, value) ->
brokerNode.propertyOverrides().put(key.toString(), value.toString()));
});
+ nodes.controllerNodes().forEach((controllerId, controllerNode)
-> {
Review Comment:
`{` is redundant.
##########
core/src/test/java/kafka/test/junit/ClusterTestExtensions.java:
##########
@@ -203,6 +205,16 @@ private ClusterTestDefaults
getClusterTestDefaults(Class<?> testClass) {
.orElseGet(() ->
EmptyClass.class.getDeclaredAnnotation(ClusterTestDefaults.class));
}
+ private static void applyConfig(ClusterConfig config,
ClusterConfigProperty property) {
+ if (property.id() == -1) {
+ config.serverProperties().put(property.key(), property.value());
+ } else if (property.id() >= CONTROLLER_ID_OFFSET) {
Review Comment:
We need to document it to make sure developers are aware of
broker/controller id when they try to define per broker/controller configs
##########
core/src/test/java/kafka/test/junit/ClusterTestExtensions.java:
##########
@@ -190,10 +192,10 @@ private void processClusterTest(ExtensionContext context,
ClusterTest annot, Clu
ClusterConfig config = builder.build();
Review Comment:
Could you please refactor the code to make `ClusterConfig` immutable? It
seems be a chaos that we pass mutable objects everywhere ...
--
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]