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

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


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 6378509c3e0 [fix](cases) fix cases for variant (#55019)
6378509c3e0 is described below

commit 6378509c3e0e8c1fa1dee6ef31af571611837258
Author: amory <[email protected]>
AuthorDate: Wed Aug 20 08:39:09 2025 +0800

    [fix](cases) fix cases for variant (#55019)
---
 .../suites/variant_p0/with_index/var_index.groovy  | 32 ++++++----------------
 1 file changed, 9 insertions(+), 23 deletions(-)

diff --git a/regression-test/suites/variant_p0/with_index/var_index.groovy 
b/regression-test/suites/variant_p0/with_index/var_index.groovy
index 21b2f5f6f00..6758314ba59 100644
--- a/regression-test/suites/variant_p0/with_index/var_index.groovy
+++ b/regression-test/suites/variant_p0/with_index/var_index.groovy
@@ -52,8 +52,7 @@ suite("regression_test_variant_var_index", "p0, 
nonConcurrent"){
     qt_sql "select * from var_index order by k limit 15"
 
     sql "DROP TABLE IF EXISTS var_index"
-    boolean findException = false
-    try {
+    test {
         sql """
             CREATE TABLE IF NOT EXISTS var_index (
                 k bigint,
@@ -64,14 +63,9 @@ suite("regression_test_variant_var_index", "p0, 
nonConcurrent"){
             DISTRIBUTED BY HASH(k) BUCKETS 1 
             properties("replication_num" = "1", "disable_auto_compaction" = 
"true", "inverted_index_storage_format" = "V1");
         """
-    } catch (Exception e) {
-        log.info(e.getMessage())
-        assertTrue(e.getMessage().contains("not supported in inverted index 
format V1"))
-        findException = true
+        exception "not supported in inverted index format V1"
     }
-    assertTrue(findException)
 
-    findException = false
     sql """
         CREATE TABLE IF NOT EXISTS var_index (
             k bigint,
@@ -82,19 +76,15 @@ suite("regression_test_variant_var_index", "p0, 
nonConcurrent"){
         properties("replication_num" = "1", "disable_auto_compaction" = 
"true", "inverted_index_storage_format" = "V1");
     """
 
-    try {
+    test {
         sql """ALTER TABLE var_index ADD INDEX idx_var(v) USING INVERTED"""
-    } catch (Exception e) {
-        log.info(e.getMessage())
-        assertTrue(e.getMessage().contains("not supported in inverted index 
format V1"))
-        findException = true
+        exception "not supported in inverted index format V1"
     }
-    assertTrue(findException)
 
     setFeConfigTemporary([enable_inverted_index_v1_for_variant: true]) {
         if (isCloudMode()) {
             sql "DROP TABLE IF EXISTS var_index"
-            try {
+            test {
                 sql """
                     CREATE TABLE IF NOT EXISTS var_index (
                         k bigint,
@@ -105,9 +95,7 @@ suite("regression_test_variant_var_index", "p0, 
nonConcurrent"){
                     DISTRIBUTED BY HASH(k) BUCKETS 1 
                     properties("replication_num" = "1", 
"disable_auto_compaction" = "true", "inverted_index_storage_format" = "V1");
                 """
-            } catch (Exception e) {
-                log.info(e.getMessage())
-                assertTrue(e.getMessage().contains("not supported in inverted 
index format V1"))
+                exception "not supported in inverted index format V1"
             }
 
             sql """
@@ -120,11 +108,9 @@ suite("regression_test_variant_var_index", "p0, 
nonConcurrent"){
                 properties("replication_num" = "1", "disable_auto_compaction" 
= "true", "inverted_index_storage_format" = "V1");
             """
 
-            try {
+            test {
                 sql """ALTER TABLE var_index ADD INDEX idx_var(v) USING 
INVERTED"""
-            } catch (Exception e) {
-                log.info(e.getMessage())
-                assertTrue(e.getMessage().contains("not supported in inverted 
index format V1"))
+                exception "not supported in inverted index format V1"
             }
         } else {
             sql """
@@ -156,4 +142,4 @@ suite("regression_test_variant_var_index", "p0, 
nonConcurrent"){
         }
         
     }
-}
\ No newline at end of file
+}


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

Reply via email to