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

zhangstar333 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 0cebee5567c [fix](test) Fix some testcases #34203
0cebee5567c is described below

commit 0cebee5567ced6d06e542429c24f0d2fa5746bc3
Author: zclllyybb <zhaochan...@selectdb.com>
AuthorDate: Sun Apr 28 20:16:53 2024 +0800

    [fix](test) Fix some testcases #34203
---
 .../storage/test_dup_tab_auto_inc_start_value_basic.groovy   |  3 +++
 .../suites/ddl_p0/test_create_table_auto_partition.groovy    |  8 +++-----
 .../insert_overwrite_p0/insert_overwrite_auto_detect.groovy  | 12 ++++++++----
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git 
a/regression-test/suites/data_model_p0/duplicate/storage/test_dup_tab_auto_inc_start_value_basic.groovy
 
b/regression-test/suites/data_model_p0/duplicate/storage/test_dup_tab_auto_inc_start_value_basic.groovy
index 07cefae8d00..5da825b353a 100644
--- 
a/regression-test/suites/data_model_p0/duplicate/storage/test_dup_tab_auto_inc_start_value_basic.groovy
+++ 
b/regression-test/suites/data_model_p0/duplicate/storage/test_dup_tab_auto_inc_start_value_basic.groovy
@@ -45,6 +45,7 @@ suite("test_dup_table_auto_inc_start_value_basic") {
         file 'auto_inc_basic.csv'
         time 10000 // limit inflight 10s
     }
+    sql " sync "
     qt_auto_inc_ids "select * from ${table1};"
     sql "drop table if exists ${table1};"
 
@@ -77,6 +78,7 @@ suite("test_dup_table_auto_inc_start_value_basic") {
         file 'auto_inc_basic.csv'
         time 10000 // limit inflight 10s
     }
+    sql " sync "
     qt_auto_inc_ids "select * from ${table2} order by id;"
     sql "drop table if exists ${table2};"
 
@@ -108,6 +110,7 @@ suite("test_dup_table_auto_inc_start_value_basic") {
         file 'auto_inc_basic.csv'
         time 10000 // limit inflight 10s
     }
+    sql " sync "
     qt_auto_inc_ids "select * from ${table3};"
     sql "drop table if exists ${table3};"
 
diff --git 
a/regression-test/suites/ddl_p0/test_create_table_auto_partition.groovy 
b/regression-test/suites/ddl_p0/test_create_table_auto_partition.groovy
index a9ca68a8777..f7bfc97dd39 100644
--- a/regression-test/suites/ddl_p0/test_create_table_auto_partition.groovy
+++ b/regression-test/suites/ddl_p0/test_create_table_auto_partition.groovy
@@ -20,11 +20,9 @@
 
 
 suite("test_create_table_auto_partition") {
-    def testTable = "test_create_table_auto_partition_table"
-
-    sql "DROP TABLE IF EXISTS ${testTable}"
+    sql "DROP TABLE IF EXISTS test_create_table_auto_partition_table"
     sql """
-    CREATE TABLE `${testTable}` (
+    CREATE TABLE `test_create_table_auto_partition_table` (
         `TIME_STAMP` datev2 NOT NULL COMMENT 'Date of collection'
     ) ENGINE=OLAP
     DUPLICATE KEY(`TIME_STAMP`)
@@ -38,7 +36,7 @@ suite("test_create_table_auto_partition") {
     """
 
     // The AUTO PARTITION func call must wrapped with ().
-    def text = sql_return_maparray "show create table ${testTable}"
+    def text = sql_return_maparray "show create table 
test_create_table_auto_partition_table"
     def createTable = text[0]['Create Table']
     assertTrue(createTable.contains("AUTO PARTITION BY RANGE 
(date_trunc(`TIME_STAMP`, 'month')"))
 }
diff --git 
a/regression-test/suites/insert_overwrite_p0/insert_overwrite_auto_detect.groovy
 
b/regression-test/suites/insert_overwrite_p0/insert_overwrite_auto_detect.groovy
index 4cf5f28e153..cd33775f221 100644
--- 
a/regression-test/suites/insert_overwrite_p0/insert_overwrite_auto_detect.groovy
+++ 
b/regression-test/suites/insert_overwrite_p0/insert_overwrite_auto_detect.groovy
@@ -77,13 +77,17 @@ suite("test_iot_auto_detect") {
    qt_sql " select * from list1 order by k0; "
 
    // with label - transactions
-   sql """ insert overwrite table list1 partition(*) with label `txn1` values 
("BEIJING"), ("7654321"); """
-   sql """ insert overwrite table list1 partition(*) with label `txn2` values 
("SHANGHAI"), ("LIST"); """
-   sql """ insert overwrite table list1 partition(*) with label `txn3` values  
("XXX"); """
+   def uniqueID1 = Math.abs(UUID.randomUUID().hashCode()).toString()
+   def uniqueID2 = Math.abs(UUID.randomUUID().hashCode()).toString()
+   def uniqueID3 = Math.abs(UUID.randomUUID().hashCode()).toString()
+   sql """ insert overwrite table list1 partition(*) with label 
`iot_auto_txn${uniqueID1}` values ("BEIJING"), ("7654321"); """
+   sql """ insert overwrite table list1 partition(*) with label 
`iot_auto_txn${uniqueID2}` values ("SHANGHAI"), ("LIST"); """
+   sql """ insert overwrite table list1 partition(*) with label 
`iot_auto_txn${uniqueID3}` values  ("XXX"); """
 
    def max_try_milli_secs = 10000
    while(max_try_milli_secs) {
-      def result = sql " show load where label like 'txn_' "
+      def result = sql " show load where label like 'iot_auto_txn%' order by 
LoadStartTime desc "
+      // the last three loads are loads upper
       if(result[0][2] == "FINISHED" && result[1][2] == "FINISHED" && 
result[2][2] == "FINISHED" ) {
          break
       } else {


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

Reply via email to