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

gabriellee 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 69b14b56a71 [Fix](cases) Make case success when meet expected error 
(#40713)
69b14b56a71 is described below

commit 69b14b56a717eee988de1c056a77fe368987e08c
Author: zclllhhjj <[email protected]>
AuthorDate: Fri Sep 13 10:35:18 2024 +0800

    [Fix](cases) Make case success when meet expected error (#40713)
    
    the partition of 1900-01-01 sometimes will be recovered directly. it
    will make loading fail. let it success
---
 .../auto_partition/test_auto_dynamic.groovy         | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git 
a/regression-test/suites/partition_p0/auto_partition/test_auto_dynamic.groovy 
b/regression-test/suites/partition_p0/auto_partition/test_auto_dynamic.groovy
index c5fa8a736db..a9e8a134fee 100644
--- 
a/regression-test/suites/partition_p0/auto_partition/test_auto_dynamic.groovy
+++ 
b/regression-test/suites/partition_p0/auto_partition/test_auto_dynamic.groovy
@@ -1,5 +1,3 @@
-
-
 // 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
@@ -19,6 +17,7 @@
 
 suite("test_auto_dynamic", "nonConcurrent") {
     // PROHIBIT different timeunit of interval when use both auto & dynamic 
partition
+    sql " drop table if exists tbl3 "
     test{
         sql """
             CREATE TABLE tbl3
@@ -117,7 +116,23 @@ suite("test_auto_dynamic", "nonConcurrent") {
     part_result = sql " show partitions from auto_dynamic "
     assertEquals(part_result.size, 1)
 
-    sql " insert into auto_dynamic values ('2024-01-01'), ('2900-01-01'), 
('1900-01-01'), ('3000-01-01'); "
+    def skip_test = false
+    test {
+        sql " insert into auto_dynamic values ('2024-01-01'), ('2900-01-01'), 
('1900-01-01'), ('3000-01-01'); "
+        check { result, exception, startTime, endTime ->
+            if (exception != null) {
+                // the partition of 1900-01-01 directly been recovered before 
the insert txn finished. let it success
+                part_result = sql " show partitions from auto_dynamic "
+                log.info("${part_result}".toString())
+                assertTrue(exception.getMessage().contains("get partition 
p19000101000000 failed"))
+                skip_test = true
+            }
+        }
+    }
+    if (skip_test) {
+        return true
+    }
+
     sql """ admin set frontend config 
('dynamic_partition_check_interval_seconds' = '1') """
     sleep(2000)
     part_result = sql " show partitions from auto_dynamic "


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to