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

zykkk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 53c3ea84832 [fix](test) Fix mysql catalog check db test (#46263)
53c3ea84832 is described below

commit 53c3ea848329e7b53788f2f76156dde52ce1c585
Author: zy-kkk <zhongy...@gmail.com>
AuthorDate: Fri Jan 3 11:12:38 2025 +0800

    [fix](test) Fix mysql catalog check db test (#46263)
    
    Because some cases will create a db in mysql, which will cause the db
    check in this case to fail, so we only need to check a few fixed dbs.
---
 .../jdbc/test_mysql_jdbc_catalog.out                 | 20 --------------------
 .../jdbc/test_mysql_jdbc_catalog.groovy              | 10 +++++++++-
 2 files changed, 9 insertions(+), 21 deletions(-)

diff --git 
a/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out 
b/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out
index d561e9be064..ae47fa97f5c 100644
--- a/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out
+++ b/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out
@@ -375,16 +375,6 @@ year       smallint        Yes     false   \N      NONE
 -- !auto_default_t2 --
 0
 
--- !sql_show_db_from_lower_case --
-doris_1
-doris_2
-doris_3
-doris_test
-information_schema
-init_db
-mysql
-show_test_do_not_modify
-
 -- !sql_show_tbl_from_lower_case --
 doris_1
 doris_2
@@ -809,16 +799,6 @@ year       smallint        Yes     false   \N      NONE
 -- !auto_default_t2 --
 0
 
--- !sql_show_db_from_lower_case --
-doris_1
-doris_2
-doris_3
-doris_test
-information_schema
-init_db
-mysql
-show_test_do_not_modify
-
 -- !sql_show_tbl_from_lower_case --
 doris_1
 doris_2
diff --git 
a/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy 
b/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy
index 483c332e1c6..73daa77ad69 100644
--- 
a/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy
+++ 
b/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy
@@ -542,7 +542,15 @@ suite("test_mysql_jdbc_catalog", 
"p0,external,mysql,external_docker,external_doc
             );
         """
 
-        qt_sql_show_db_from_lower_case "show databases from 
mysql_lower_case_catalog;"
+        test {
+            sql """ show databases from mysql_lower_case_catalog; """
+            check { result, ex, startTime, endTime ->
+                def expectedDatabases = ["doris_1", "doris_2", "doris_3"]
+                expectedDatabases.each { dbName ->
+                    assertTrue(result.collect { it[0] }.contains(dbName), 
"Expected database '${dbName}' not found in result")
+                }
+            }
+        }
         qt_sql_show_tbl_from_lower_case "show tables from 
mysql_lower_case_catalog.doris_2;"
         qt_sql1_from_lower_case "select * from 
mysql_lower_case_catalog.doris_2.doris_1 order by id;"
         qt_sql2_from_lower_case "select * from 
mysql_lower_case_catalog.doris_2.doris_2 order by id;"


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

Reply via email to