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 b0f4caac7d3 branch-3.1: [chore](case) do not use global var in groovy 
#54700 (#54806)
b0f4caac7d3 is described below

commit b0f4caac7d314a7626fea576fe1766606807a03b
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Aug 19 15:54:46 2025 +0800

    branch-3.1: [chore](case) do not use global var in groovy #54700 (#54806)
    
    Cherry-picked from #54700
    
    Co-authored-by: Yongqiang YANG <[email protected]>
---
 .../test_schema_change_with_compaction11.groovy        | 18 +++++++++---------
 .../test_sc_fail_release_delete_bitmap_lock.groovy     |  4 ++--
 .../test_fix_tablet_stat_fault_injection.groovy        |  6 +++---
 .../suites/load_p0/stream_load/test_json_load.groovy   |  2 +-
 .../test_partial_update_conflict_be_restart.groovy     |  1 -
 5 files changed, 15 insertions(+), 16 deletions(-)

diff --git 
a/regression-test/suites/cloud_p0/schema_change/compaction11/test_schema_change_with_compaction11.groovy
 
b/regression-test/suites/cloud_p0/schema_change/compaction11/test_schema_change_with_compaction11.groovy
index 0e765e46b7b..310c10b4dbc 100644
--- 
a/regression-test/suites/cloud_p0/schema_change/compaction11/test_schema_change_with_compaction11.groovy
+++ 
b/regression-test/suites/cloud_p0/schema_change/compaction11/test_schema_change_with_compaction11.groovy
@@ -109,7 +109,7 @@ suite('test_schema_change_with_compaction11', 'docker') {
             def newTabletId = array[1].TabletId
             trigger_and_wait_compaction("date", "base")
             logger.info("run compaction:" + newTabletId)
-            (code, out, err) = be_run_base_compaction(injectBe.Host, 
injectBe.HttpPort, newTabletId)
+            def (code, out, err) = be_run_base_compaction(injectBe.Host, 
injectBe.HttpPort, newTabletId)
             logger.info("Run compaction: code=" + code + ", out=" + out + ", 
err=" + err)
             assertTrue(out.contains("invalid tablet state."))
 
@@ -120,11 +120,11 @@ suite('test_schema_change_with_compaction11', 'docker') {
             (code, out, err) = be_run_cumulative_compaction(injectBe.Host, 
injectBe.HttpPort, tabletId)
             logger.info("Run compaction: code=" + code + ", out=" + out + ", 
err=" + err)
 
-            running = true
+            def running = true
             do {
                 Thread.sleep(100)
-                tabletId = array[0].TabletId
-                (code, out, err) = be_get_compaction_status(injectBe.Host, 
injectBe.HttpPort, tabletId)
+                def currentTabletId = array[0].TabletId
+                (code, out, err) = be_get_compaction_status(injectBe.Host, 
injectBe.HttpPort, currentTabletId)
                 logger.info("Get compaction status: code=" + code + ", out=" + 
out + ", err=" + err)
                 assertEquals(code, 0)
                 def compactionStatus = parseJson(out.trim())
@@ -133,9 +133,9 @@ suite('test_schema_change_with_compaction11', 'docker') {
             } while (running)
 
              // new tablet cannot do cu compaction
-            tabletId = array[1].TabletId
-            logger.info("run compaction:" + tabletId)
-            (code, out, err) = be_run_cumulative_compaction(injectBe.Host, 
injectBe.HttpPort, tabletId)
+            def newTabletIdForCu = array[1].TabletId
+            logger.info("run compaction:" + newTabletIdForCu)
+            (code, out, err) = be_run_cumulative_compaction(injectBe.Host, 
injectBe.HttpPort, newTabletIdForCu)
             logger.info("Run compaction: code=" + code + ", out=" + out + ", 
err=" + err)
             assertTrue(out.contains("invalid tablet state."))
 
@@ -162,7 +162,7 @@ suite('test_schema_change_with_compaction11', 'docker') {
             assertEquals(count[0][0], 2556);
             // check rowsets
             logger.info("run show:" + originTabletId)
-            (code, out, err) = be_show_tablet_status(injectBe.Host, 
injectBe.HttpPort, originTabletId)
+            def (code, out, err) = be_show_tablet_status(injectBe.Host, 
injectBe.HttpPort, originTabletId)
             logger.info("Run show: code=" + code + ", out=" + out + ", err=" + 
err)
             assertTrue(out.contains("[0-1]"))
             assertTrue(out.contains("[2-7]"))
@@ -186,7 +186,7 @@ suite('test_schema_change_with_compaction11', 'docker') {
 
 
             // wait for all compactions done
-            boolean running = true
+            def running = true
             while (running) {
                 Thread.sleep(100)
                 (code, out, err) = be_get_compaction_status(injectBe.Host, 
injectBe.HttpPort, newTabletId)
diff --git 
a/regression-test/suites/fault_injection_p0/cloud/test_sc_fail_release_delete_bitmap_lock.groovy
 
b/regression-test/suites/fault_injection_p0/cloud/test_sc_fail_release_delete_bitmap_lock.groovy
index 60d995b3238..ffebceae152 100644
--- 
a/regression-test/suites/fault_injection_p0/cloud/test_sc_fail_release_delete_bitmap_lock.groovy
+++ 
b/regression-test/suites/fault_injection_p0/cloud/test_sc_fail_release_delete_bitmap_lock.groovy
@@ -122,9 +122,9 @@ suite("test_sc_fail_release_delete_bitmap_lock", 
"nonConcurrent") {
             assert res[0].State == "CANCELLED"
             assert res[0].Msg.contains("[DELETE_BITMAP_LOCK_ERROR]test update 
delete bitmap failed")
             
GetDebugPoint().disableDebugPointForAllBEs("CloudMetaMgr::test_update_delete_bitmap_fail")
-            now = System.currentTimeMillis()
+            def now = System.currentTimeMillis()
             do_insert_into()
-            time_cost = System.currentTimeMillis() - now
+            def time_cost = System.currentTimeMillis() - now
             log.info("time_cost(ms): ${time_cost}")
             assertTrue(time_cost < 10000, "wait time should less than 10s")
         }
diff --git 
a/regression-test/suites/fault_injection_p0/test_fix_tablet_stat_fault_injection.groovy
 
b/regression-test/suites/fault_injection_p0/test_fix_tablet_stat_fault_injection.groovy
index 5703bbd29c4..cc248522a27 100644
--- 
a/regression-test/suites/fault_injection_p0/test_fix_tablet_stat_fault_injection.groovy
+++ 
b/regression-test/suites/fault_injection_p0/test_fix_tablet_stat_fault_injection.groovy
@@ -71,7 +71,7 @@ suite("test_fix_tablet_stat_fault_injection", 
"nonConcurrent") {
                 int rowsetCount = 0
                 for (def tablet in tablets) {
                     String tablet_id = tablet.TabletId
-                    (code, out, err) = curl("GET", tablet.CompactionStatus)
+                    def (code, out, err) = curl("GET", tablet.CompactionStatus)
                     logger.info("Show tablets status after insert data: code=" 
+ code + ", out=" + out + ", err=" + err)
                     assertEquals(code, 0)
                     def tabletJson = parseJson(out.trim())
@@ -88,7 +88,7 @@ suite("test_fix_tablet_stat_fault_injection", 
"nonConcurrent") {
                 rowsetCount = 0
                 for (def tablet in tablets) {
                     String tablet_id = tablet.TabletId
-                    (code, out, err) = curl("GET", tablet.CompactionStatus)
+                    def (code, out, err) = curl("GET", tablet.CompactionStatus)
                     logger.info("Show tablets status after full compaction: 
code=" + code + ", out=" + out + ", err=" + err)
                     assertEquals(code, 0)
                     def tabletJson = parseJson(out.trim())
@@ -109,7 +109,7 @@ suite("test_fix_tablet_stat_fault_injection", 
"nonConcurrent") {
                 rowsetCount = 0
                 for (def tablet in tablets) {
                     String tablet_id = tablet.TabletId
-                    (code, out, err) = curl("GET", tablet.CompactionStatus)
+                    def (code, out, err) = curl("GET", tablet.CompactionStatus)
                     //logger.info("Show tablets status after fix stats: code=" 
+ code + ", out=" + out + ", err=" + err)
                     assertEquals(code, 0)
                     def tabletJson = parseJson(out.trim())
diff --git a/regression-test/suites/load_p0/stream_load/test_json_load.groovy 
b/regression-test/suites/load_p0/stream_load/test_json_load.groovy
index 3be34c7989a..172fd9fe7a9 100644
--- a/regression-test/suites/load_p0/stream_load/test_json_load.groovy
+++ b/regression-test/suites/load_p0/stream_load/test_json_load.groovy
@@ -230,7 +230,7 @@ suite("test_json_load", "p0,nonConcurrent") {
     def check_load_result = {checklabel, testTablex ->
         def max_try_milli_secs = 10000
         while(max_try_milli_secs) {
-            result = sql "show load where label = '${checklabel}'"
+            def result = sql "show load where label = '${checklabel}'"
             if(result[0][2] == "FINISHED") {
                 sql "sync"
                 qt_select "select * from ${testTablex} order by id"
diff --git 
a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_conflict_be_restart.groovy
 
b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_conflict_be_restart.groovy
index bf425f40ed0..aaf8a3e0bd0 100644
--- 
a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_conflict_be_restart.groovy
+++ 
b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_conflict_be_restart.groovy
@@ -30,7 +30,6 @@ import org.apache.http.protocol.HttpContext
 import org.apache.http.HttpRequest
 import org.apache.http.impl.client.LaxRedirectStrategy
 import org.apache.http.client.methods.RequestBuilder
-import org.apache.http.entity.StringEntity
 import org.apache.http.client.methods.CloseableHttpResponse
 import org.apache.http.util.EntityUtils
 import org.apache.doris.regression.suite.ClusterOptions


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

Reply via email to