FrankYang0529 commented on code in PR #18997: URL: https://github.com/apache/kafka/pull/18997#discussion_r1968664549
########## metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java: ########## @@ -373,7 +373,7 @@ public void testElrEnabledByDefault() throws Throwable { )). build() ) { - controlEnv.activeController(true); + controlEnv.activeController(); Review Comment: I try to change the function as following and the test can pass without active controller check. ```java @Override public CompletableFuture<BrokerRegistrationReply> registerBroker( ControllerRequestContext context, BrokerRegistrationRequestData request ) { return appendWriteEvent("registerBroker", context.deadlineNs(), () -> { // populate finalized features map with latest known kraft version for validation Map<String, Short> controllerFeatures = new HashMap<>(featureControl.finalizedFeatures(Long.MAX_VALUE).featureMap()); controllerFeatures.put(KRaftVersion.FEATURE_NAME, raftClient.kraftVersion().featureLevel()); return clusterControl. registerBroker(request, offsetControl.nextWriteOffset(), new FinalizedControllerFeatures(controllerFeatures, Long.MAX_VALUE), context.requestHeader().requestApiVersion() >= 3); }, EnumSet.noneOf(ControllerOperationFlag.class)); } ``` -- 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