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

gavinchou 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 26d68d778a4 [opt](regression) Fix unstable regression test 
test_alter_table_property and test_compaction_score_action (#46394)
26d68d778a4 is described below

commit 26d68d778a44b31d24a147065c38da58d623303e
Author: Gavin Chou <ga...@selectdb.com>
AuthorDate: Sun Jan 5 19:11:37 2025 +0800

    [opt](regression) Fix unstable regression test test_alter_table_property 
and test_compaction_score_action (#46394)
    
    * Enlarge regression test timeout to 100 sec for 
test_compaction_score_action
    * Fix test_alter_table_property for local mode
---
 regression-test/plugins/plugin_curl_requester.groovy               | 7 +++----
 .../suites/compaction/test_compaction_score_action.groovy          | 4 ++--
 .../suites/schema_change/test_alter_table_property.groovy          | 3 ++-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/regression-test/plugins/plugin_curl_requester.groovy 
b/regression-test/plugins/plugin_curl_requester.groovy
index cb8e04acf6a..05c43bbeebf 100644
--- a/regression-test/plugins/plugin_curl_requester.groovy
+++ b/regression-test/plugins/plugin_curl_requester.groovy
@@ -112,7 +112,7 @@ Suite.metaClass.http_client = { String method, String url 
/* param */ ->
 
 logger.info("Added 'http_client' function to Suite")
 
-Suite.metaClass.curl = { String method, String url, String body = null /* 
param */->
+Suite.metaClass.curl = { String method, String url, String body = null, 
Integer timeoutSec = 10 /* param */->
     Suite suite = delegate as Suite
     if (method != "GET" && method != "POST") {
         throw new Exception(String.format("invalid curl method: %s", method))
@@ -121,16 +121,15 @@ Suite.metaClass.curl = { String method, String url, 
String body = null /* param
         throw new Exception("invalid curl url, blank")
     }
 
-    Integer timeout = 10; // 10 seconds;
     Integer maxRetries = 10; // Maximum number of retries
     Integer retryCount = 0; // Current retry count
     Integer sleepTime = 5000; // Sleep time in milliseconds
 
     String cmd
     if (method == "POST" && body != null) {
-        cmd = String.format("curl --max-time %d -X %s -H 
Content-Type:application/json -d %s %s", timeout, method, body, url).toString()
+        cmd = String.format("curl --max-time %d -X %s -H 
Content-Type:application/json -d %s %s", timeoutSec, method, body, 
url).toString()
     } else {
-        cmd = String.format("curl --max-time %d -X %s %s", timeout, method, 
url).toString()
+        cmd = String.format("curl --max-time %d -X %s %s", timeoutSec, method, 
url).toString()
     }
 
     logger.info("curl cmd: " + cmd)
diff --git 
a/regression-test/suites/compaction/test_compaction_score_action.groovy 
b/regression-test/suites/compaction/test_compaction_score_action.groovy
index 9ab8743778f..b27114c3dbd 100644
--- a/regression-test/suites/compaction/test_compaction_score_action.groovy
+++ b/regression-test/suites/compaction/test_compaction_score_action.groovy
@@ -39,12 +39,12 @@ suite("test_compaction_score_action") {
     for (int i=0;i<backendId_to_backendIP.size();i++){
         def beHttpAddress 
=backendId_to_backendIP.entrySet()[i].getValue()+":"+backendId_to_backendHttpPort.entrySet()[i].getValue()
         if (isCloudMode()) {
-            def (code, text, err) = curl("GET",beHttpAddress+ 
"/api/compaction_score?top_n=1&sync_meta=true")
+            def (code, text, err) = curl("GET", beHttpAddress+ 
"/api/compaction_score?top_n=1&sync_meta=true", null/*body*/, 100/*timeoutSec*/)
             def score_str = parseJson(text).get(0).get("compaction_score")
             def score = Integer.parseInt(score_str)
             assertTrue(score >= 90)
         } else {
-            def (code, text, err) = 
curl("GET",beHttpAddress+"/api/compaction_score?top_n=1")
+            def (code, text, err) = curl("GET", 
beHttpAddress+"/api/compaction_score?top_n=1")
             def score_str = parseJson(text).get(0).get("compaction_score")
             def score = Integer.parseInt(score_str)
             assertTrue(score >= 90)
diff --git 
a/regression-test/suites/schema_change/test_alter_table_property.groovy 
b/regression-test/suites/schema_change/test_alter_table_property.groovy
index 3d94d88c8dc..f2383b800c6 100644
--- a/regression-test/suites/schema_change/test_alter_table_property.groovy
+++ b/regression-test/suites/schema_change/test_alter_table_property.groovy
@@ -51,7 +51,8 @@ suite("test_alter_table_property") {
             sql """
                 alter table ${tableName} set ("file_cache_ttl_seconds" = 
"86400")
                 """
-            exception "modifying property [file_cache_ttl_seconds] is 
forbidden"
+            // exception "modifying property [file_cache_ttl_seconds] is 
forbidden"
+            exception "Cann't modify property 'file_cache_ttl_seconds'"
         }
     } else {
         test {


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

Reply via email to