chia7712 commented on code in PR #17013: URL: https://github.com/apache/kafka/pull/17013#discussion_r1734583869
########## core/src/test/java/kafka/test/junit/RaftClusterInvocationContext.java: ########## @@ -246,21 +247,48 @@ public Map<Integer, ControllerServer> controllers() { public void format() throws Exception { if (formated.compareAndSet(false, true)) { - List<ApiMessageAndVersion> records = new ArrayList<>(); - records.add( - new ApiMessageAndVersion(new FeatureLevelRecord(). - setName(MetadataVersion.FEATURE_NAME). - setFeatureLevel(clusterConfig.metadataVersion().featureLevel()), (short) 0)); - - clusterConfig.features().forEach((feature, version) -> { - records.add( - new ApiMessageAndVersion(new FeatureLevelRecord(). - setName(feature.featureName()). - setFeatureLevel(version), (short) 0)); + Map<String, Features> nameToSupportedFeature = new TreeMap<>(); Review Comment: > Another approach would be to keep it as it is and to handle the refactor in https://github.com/apache/kafka/pull/16991 as it is already refactoring it. fair enough -- 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