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

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


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new f25cf58d20b branch-3.0: [feat](regression) inject debug points need 
run in nonConcurrent or docker suites #49581 (#49619)
f25cf58d20b is described below

commit f25cf58d20b471efd4bc2d17deaa348d9e803a5b
Author: yujun <[email protected]>
AuthorDate: Wed Apr 30 17:21:00 2025 +0800

    branch-3.0: [feat](regression) inject debug points need run in 
nonConcurrent or docker suites #49581 (#49619)
    
    Cherry-picked from #49581
---
 .../org/apache/doris/regression/suite/Suite.groovy |  7 ++++
 .../backup_restore/test_backup_cancelled.groovy    | 45 +++++++++++-----------
 .../test_backup_restore_atomic_with_alter.groovy   |  6 ++-
 .../suites/demo_p0/debugpoint_action.groovy        | 26 +++++++++++++
 .../test_partial_update_during_sc.groovy           |  2 +-
 .../join/test_slow_close/test_slow_close.groovy    |  2 +-
 6 files changed, 63 insertions(+), 25 deletions(-)

diff --git 
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy
 
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy
index c436c1d5ebd..7835b905cc6 100644
--- 
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy
+++ 
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy
@@ -1568,6 +1568,13 @@ class Suite implements GroovyInterceptable {
     }
 
     DebugPoint GetDebugPoint() {
+        def execType = RegressionTest.getGroupExecType(group);
+        if (execType != RegressionTest.GroupExecType.SINGLE
+            && execType != RegressionTest.GroupExecType.DOCKER) {
+            throw new Exception("Debug point must use in nonConcurrent suite 
or docker suite, "
+                    + "need add 'nonConcurrent' or 'docker' to suite's belong 
groups, "
+                    + "see example demo_p0/debugpoint_action.groovy.")
+        }
         return debugPoint
     }
 
diff --git a/regression-test/suites/backup_restore/test_backup_cancelled.groovy 
b/regression-test/suites/backup_restore/test_backup_cancelled.groovy
index ef95d870d18..4e021fa6524 100644
--- a/regression-test/suites/backup_restore/test_backup_cancelled.groovy
+++ b/regression-test/suites/backup_restore/test_backup_cancelled.groovy
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-suite("test_backup_cancelled", "backup_cancelled") {
+suite("test_backup_cancelled", "backup_cancelled,nonConcurrent") {
     String suiteName = "test_backup_cancelled"
     String repoName = "${suiteName}_repo_" + 
UUID.randomUUID().toString().replace("-", "")
     String dbName = "${suiteName}_db"
@@ -58,36 +58,37 @@ suite("test_backup_cancelled", "backup_cancelled") {
 
     // test failed to get tablet when truncate or drop table
 
-    
GetDebugPoint().enableDebugPointForAllBEs("SnapshotManager::make_snapshot.inject_failure",
 [tablet_id:"${tabletId}", execute:3]);
-
-
-    sql """
-        BACKUP SNAPSHOT ${dbName}.${snapshotName}
-        TO `${repoName}`
-        ON (${tableName})
-    """
-
-    syncer.waitSnapshotFinish(dbName)
+    try {
+        
GetDebugPoint().enableDebugPointForAllBEs("SnapshotManager::make_snapshot.inject_failure",
 [tablet_id:"${tabletId}", execute:3]);
 
+        sql """
+            BACKUP SNAPSHOT ${dbName}.${snapshotName}
+            TO `${repoName}`
+            ON (${tableName})
+        """
 
-    
GetDebugPoint().disableDebugPointForAllBEs("SnapshotManager::make_snapshot.inject_failure")
+        syncer.waitSnapshotFinish(dbName)
+    } finally {
+        
GetDebugPoint().disableDebugPointForAllBEs("SnapshotManager::make_snapshot.inject_failure")
+    }
 
 
 
 
     // test missing versions when compaction or balance
+    try {
+        
GetDebugPoint().enableDebugPointForAllBEs("Tablet::capture_consistent_versions.inject_failure",
 [tablet_id:"${tabletId}", execute:1]);
 
-    
GetDebugPoint().enableDebugPointForAllBEs("Tablet::capture_consistent_versions.inject_failure",
 [tablet_id:"${tabletId}", execute:1]);
-
-    sql """
-        BACKUP SNAPSHOT ${dbName}.${snapshotName_1}
-        TO `${repoName}`
-        ON (${tableName})
-    """
-
-    syncer.waitSnapshotFinish(dbName)
+        sql """
+            BACKUP SNAPSHOT ${dbName}.${snapshotName_1}
+            TO `${repoName}`
+            ON (${tableName})
+        """
 
-    
GetDebugPoint().disableDebugPointForAllBEs("Tablet::capture_consistent_versions.inject_failure");
+        syncer.waitSnapshotFinish(dbName)
+    } finally {
+        
GetDebugPoint().disableDebugPointForAllBEs("Tablet::capture_consistent_versions.inject_failure");
+    }
 
 
     def snapshot = syncer.getSnapshotTimestamp(repoName, snapshotName)
diff --git 
a/regression-test/suites/backup_restore/test_backup_restore_atomic_with_alter.groovy
 
b/regression-test/suites/backup_restore/test_backup_restore_atomic_with_alter.groovy
index 2754e5f8af6..4c835f02ef5 100644
--- 
a/regression-test/suites/backup_restore/test_backup_restore_atomic_with_alter.groovy
+++ 
b/regression-test/suites/backup_restore/test_backup_restore_atomic_with_alter.groovy
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-suite("test_backup_restore_atomic_with_alter", "backup_restore") {
+suite("test_backup_restore_atomic_with_alter", "backup_restore,nonConcurrent") 
{
     if (!getFeConfig("enable_debug_points").equals("true")) {
         logger.info("Config.enable_debug_points=true is required")
         return
@@ -96,6 +96,7 @@ suite("test_backup_restore_atomic_with_alter", 
"backup_restore") {
     sql "DROP TABLE ${dbName}.${tableNamePrefix}_0 FORCE"
 
     // disable restore
+ try {
     
GetDebugPoint().enableDebugPointForAllFEs("FE.PAUSE_NON_PENDING_RESTORE_JOB", 
[value:snapshotName])
 
     sql """
@@ -239,6 +240,9 @@ suite("test_backup_restore_atomic_with_alter", 
"backup_restore") {
     }
     sql "DROP DATABASE ${dbName} FORCE"
     sql "DROP REPOSITORY `${repoName}`"
+  } finally {
+    
GetDebugPoint().disableDebugPointForAllFEs("FE.PAUSE_NON_PENDING_RESTORE_JOB")
+  }
 }
 
 
diff --git a/regression-test/suites/demo_p0/debugpoint_action.groovy 
b/regression-test/suites/demo_p0/debugpoint_action.groovy
index 78355b9c5ed..9ad71a8345f 100644
--- a/regression-test/suites/demo_p0/debugpoint_action.groovy
+++ b/regression-test/suites/demo_p0/debugpoint_action.groovy
@@ -15,6 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
+import org.junit.Assert
+
+// This is a good example.
+// Debug point must run in 'nonConcurrent' or 'docker' suites.
+// If not a docker suite, must put nonConcurrent to the groups.
 suite('debugpoint_action', 'nonConcurrent') {
     try {
         
GetDebugPoint().enableDebugPointForAllFEs('PublishVersionDaemon.stop_publish', 
[timeout:1])
@@ -25,3 +30,24 @@ suite('debugpoint_action', 'nonConcurrent') {
         
GetDebugPoint().disableDebugPointForAllBEs('Tablet.build_tablet_report_info.version_miss')
     }
 }
+
+// This is a bad example.
+// its group tag not contains nonConcurrent or docker.
+suite('debugpoint_action_bad') {
+    Exception exception = null;
+    try {
+        GetDebugPoint().enableDebugPointForAllFEs('debugpoint_action_bad_xx', 
[timeout:1])
+    } catch (Exception e) {
+        exception = e
+    } finally {
+        // this is bad example, should disable or clear debug points after end 
suite
+        // 
GetDebugPoint().disableDebugPointForAllFEs('debugpoint_action_bad_xx')
+    }
+
+    Assert.assertNotNull(exception)
+    def expectMsg = "Debug point must use in nonConcurrent suite or docker 
suite"
+    def msg = exception.toString()
+    log.info("meet exception: ${msg}")
+    Assert.assertTrue("Expect exception msg contains '${expectMsg}', but meet 
'${msg}'",
+            msg.contains(expectMsg))
+}
diff --git 
a/regression-test/suites/fault_injection_p0/partial_update/test_partial_update_during_sc.groovy
 
b/regression-test/suites/fault_injection_p0/partial_update/test_partial_update_during_sc.groovy
index b6f58af6223..084aa54da47 100644
--- 
a/regression-test/suites/fault_injection_p0/partial_update/test_partial_update_during_sc.groovy
+++ 
b/regression-test/suites/fault_injection_p0/partial_update/test_partial_update_during_sc.groovy
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-suite('test_partial_update_during_sc') {
+suite('test_partial_update_during_sc', 'nonConcurrent') {
 
     String db = context.config.getDbNameByFile(context.file)
     sql "select 1;" // to create database
diff --git 
a/regression-test/suites/query_p0/join/test_slow_close/test_slow_close.groovy 
b/regression-test/suites/query_p0/join/test_slow_close/test_slow_close.groovy
index 0b36d2da5ab..4ae5ee5370c 100644
--- 
a/regression-test/suites/query_p0/join/test_slow_close/test_slow_close.groovy
+++ 
b/regression-test/suites/query_p0/join/test_slow_close/test_slow_close.groovy
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-suite("test_slow_close") {
+suite("test_slow_close", "nonConcurrent") {
     sql "set disable_join_reorder=true;"
     sql "set runtime_filter_type='bloom_filter';"
     sql "set parallel_pipeline_task_num=3"


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

Reply via email to