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

dataroaring 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 f6a02fd4015 [regression test](routine load) add case for invaild 
format (#27245)
f6a02fd4015 is described below

commit f6a02fd40159e14708af54b9364362382875b8d7
Author: Guangdong Liu <[email protected]>
AuthorDate: Thu Nov 23 14:30:36 2023 +0800

    [regression test](routine load) add case for invaild format (#27245)
---
 .../load_p0/routine_load/test_routine_load.groovy  | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git 
a/regression-test/suites/load_p0/routine_load/test_routine_load.groovy 
b/regression-test/suites/load_p0/routine_load/test_routine_load.groovy
index 0a76a0d8636..1456bb8c6b9 100644
--- a/regression-test/suites/load_p0/routine_load/test_routine_load.groovy
+++ b/regression-test/suites/load_p0/routine_load/test_routine_load.groovy
@@ -956,6 +956,48 @@ suite("test_routine_load","p0") {
         }
     }
 
+    // invalid format
+    i = 0
+    if (enabled != null && enabled.equalsIgnoreCase("true")) {
+        try {
+            for (String tableName in tables) {
+                sql new 
File("""${context.file.parent}/ddl/${tableName}_drop.sql""").text
+                sql new 
File("""${context.file.parent}/ddl/${tableName}_create.sql""").text
+
+                def name = "routine_load_" + tableName
+                try {
+                    sql """
+                    CREATE ROUTINE LOAD ${jobs[i]} ON ${name}
+                    COLUMNS(${columns[i]})
+                    PROPERTIES
+                    (
+                        "format" = "test",
+                        "max_batch_interval" = "5",
+                        "max_batch_rows" = "300000",
+                        "max_batch_size" = "209715200"
+                    )
+                    FROM KAFKA
+                    (
+                        "kafka_broker_list" = "${externalEnvIp}:${kafka_port}",
+                        "kafka_topic" = "${jsonTopic[i]}",
+                        "property.kafka_default_offsets" = "OFFSET_BEGINNING"
+                    );
+                """
+                    sql "sync"
+                }catch (Exception e) {
+                    log.info("create routine load failed: ${e.getMessage()}")
+                    assertEquals(e.getMessage(), "errCode = 2, detailMessage = 
Format type is invalid. format=`test`")
+                }
+                i++
+            }
+
+        } finally {
+            for (String tableName in tables) {
+                sql new 
File("""${context.file.parent}/ddl/${tableName}_drop.sql""").text
+            }
+        }
+    }
+
     i = 0
     if (enabled != null && enabled.equalsIgnoreCase("true")) {
         try {


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

Reply via email to