You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2026/04/25 01:30:15 UTC

(doris) branch branch-4.1 updated: branch-4.1: [fix](cases) skip cases if broker does not exist (#62831)

This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new 4d9eeef5d6f branch-4.1: [fix](cases) skip cases if broker does not exist (#62831)
4d9eeef5d6f is described below

commit 4d9eeef5d6f10a180573b2463b9514dc5186ac9e
Author: Mingyu Chen (Rayner) <yu...@selectdb.com>
AuthorDate: Fri Apr 24 18:30:07 2026 -0700

    branch-4.1: [fix](cases) skip cases if broker does not exist (#62831)
---
 .../outfile/csv/test_outfile_empty_data.groovy     | 23 +++++++++++++++-------
 .../broker_load/test_broker_load_func.groovy       |  8 ++++++++
 2 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/regression-test/suites/export_p0/outfile/csv/test_outfile_empty_data.groovy b/regression-test/suites/export_p0/outfile/csv/test_outfile_empty_data.groovy
index d14dc119ddb..9d43103ff0c 100644
--- a/regression-test/suites/export_p0/outfile/csv/test_outfile_empty_data.groovy
+++ b/regression-test/suites/export_p0/outfile/csv/test_outfile_empty_data.groovy
@@ -51,6 +51,13 @@ suite("test_outfile_empty_data", "external,hive,tvf,external_docker") {
     // broker
     String broker_name = "hdfs"
 
+    def brokers = sql """SHOW BROKER;"""
+    logger.info("SHOW BROKER result: ${brokers}")
+    def broker_exists = brokers.any { it[0] == broker_name }
+    if (!broker_exists) {
+        logger.warn("broker '${broker_name}' does not exist, skip outfile-with-broker part in test_outfile_empty_data")
+    }
+
     def export_table_name = "outfile_empty_data_test"
 
     def create_table = {table_name, column_define ->
@@ -134,10 +141,10 @@ suite("test_outfile_empty_data", "external,hive,tvf,external_docker") {
         // test outfile empty data to hdfs directly
         def outfile_to_hdfs_directly_url = outfile_to_HDFS_directly()
         // test outfile empty data to hdfs with broker
-        def outfile_to_hdfs_with_broker_url= outfile_to_HDFS_with_broker()
+        def outfile_to_hdfs_with_broker_url = broker_exists ? outfile_to_HDFS_with_broker() : null
         // test outfile empty data to s3 directly
         def outfile_to_s3_directly_url = outfile_to_S3_directly()
-        qt_select_base1 """ SELECT * FROM ${export_table_name} ORDER BY user_id; """ 
+        qt_select_base1 """ SELECT * FROM ${export_table_name} ORDER BY user_id; """
 
         qt_select_tvf1 """ select * from HDFS(
                     "uri" = "${outfile_to_hdfs_directly_url}0.csv",
@@ -145,11 +152,13 @@ suite("test_outfile_empty_data", "external,hive,tvf,external_docker") {
                     "format" = "${format}");
                     """
 
-        qt_select_tvf2 """ select * from HDFS(
-                    "uri" = "${outfile_to_hdfs_with_broker_url}0.csv",
-                    "hadoop.username" = "${hdfsUserName}",
-                    "format" = "${format}");
-                    """
+        if (broker_exists) {
+            qt_select_tvf2 """ select * from HDFS(
+                        "uri" = "${outfile_to_hdfs_with_broker_url}0.csv",
+                        "hadoop.username" = "${hdfsUserName}",
+                        "format" = "${format}");
+                        """
+        }
         
         qt_select_tvf3 """ SELECT * FROM S3 (
                 "uri" = "http://${bucket}.${s3_endpoint}${outfile_to_s3_directly_url.substring(5 + bucket.length(), outfile_to_s3_directly_url.length())}0.csv",
diff --git a/regression-test/suites/external_table_p0/broker_load/test_broker_load_func.groovy b/regression-test/suites/external_table_p0/broker_load/test_broker_load_func.groovy
index ed8ff2161cf..0ba379c5894 100644
--- a/regression-test/suites/external_table_p0/broker_load/test_broker_load_func.groovy
+++ b/regression-test/suites/external_table_p0/broker_load/test_broker_load_func.groovy
@@ -29,6 +29,13 @@ suite("test_broker_load_func", "p0,external,hive,external_docker,external_docker
             def test_load_label="label_test_broker_load_func_${uuid}"
             String table_name="simple"
 
+            def brokers = sql """SHOW BROKER;"""
+            logger.info("SHOW BROKER result: ${brokers}")
+            if (!brokers.any { it[0] == broker_name }) {
+                logger.warn("broker '${broker_name}' does not exist, skip test_broker_load_func")
+                return
+            }
+
             sql """drop database if exists ${database_name}; """
             sql """create database if not exists ${database_name};"""
             sql """use ${database_name}; """
@@ -71,6 +78,7 @@ suite("test_broker_load_func", "p0,external,hive,external_docker,external_docker
                         sleep(1000) // wait 1 second every time
                         max_try_milli_secs -= 1000
                         if(max_try_milli_secs <= 0) {
+                            logger.warn("broker load '${checklabel}' did not finish in time, show load result: ${result}")
                             assertEquals(1, 2)
                         }
                     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org