github-actions[bot] commented on code in PR #60323: URL: https://github.com/apache/doris/pull/60323#discussion_r3533100701
########## regression-test/suites/external_table_p0/tvf/test_brokers_tvf.groovy: ########## @@ -0,0 +1,156 @@ +// 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. + +// This suit test the `brokers` tvf +suite("test_brokers_tvf","p0") { + def brokerClusterName = "brokers_tvf_test_cluster" + try { + def address1 = "172.18.0.1" + def address2 = "172.18.0.2" + def address3 = "172.18.0.3" + def port = 18310 + def columns = new ArrayList() + def columnMeta = sql """describe function brokers();""" + def size = columnMeta.size() + for (i in 0..<size) { + columns.add(columnMeta[i][0]) + } + def columnsExpr = String.join(",", columns) + log.info("columns expr: ${columnsExpr}") + + def brokers = sql """select ${columnsExpr} from brokers()""" Review Comment: This makes the suite depend on the whole FE broker registry being empty before it owns any state. `brokers()` and `show broker` return global broker metadata, while other regression suites and manual/debug runs can leave unrelated broker names behind. In that case these initial `size() == 0` assertions fail even though the new TVF works for this test's broker cluster. Please make the setup and assertions scoped to `brokers_tvf_test_cluster`: drop that name before starting, assert `brokers("cluster_name" = brokerClusterName)` is empty before add, and avoid asserting that the entire broker registry has no rows. -- 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]
