github-actions[bot] commented on code in PR #66089: URL: https://github.com/apache/doris/pull/66089#discussion_r3655410091
########## fe/fe-core/src/test/java/org/apache/doris/datasource/kafka/KafkaUtilTest.java: ########## @@ -0,0 +1,60 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.doris.datasource.kafka; + +import org.apache.doris.catalog.Env; +import org.apache.doris.cloud.system.CloudSystemInfoService; +import org.apache.doris.common.Config; +import org.apache.doris.system.Backend; + +import org.junit.Assert; +import org.junit.Test; +import org.mockito.MockedStatic; +import org.mockito.Mockito; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +public class KafkaUtilTest { + @Test Review Comment: Please exercise the blacklist fallback here, not only the helper's happy path. This test calls `getBackendIdsForMetaRequest` directly, so it would still pass if `getInfoRequest`'s fallback again selected a blacklisted backend from another compute group. Add a case where every normal in-group backend is blacklisted and a foreign-group backend is also blacklisted, and assert that only the in-group fallback can be selected (or extract the fallback selection into a package-visible helper). Please also cover the new empty-group failure and the preserved non-cloud branch. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
