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 51db89ba7eea4f..c3bd25ad99492d 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 @@ -546,6 +546,17 @@ class Suite implements GroovyInterceptable { } } + + void expectException(Closure userFunction, String tableName, String errorMessage = null) { + try { + userFunction() + } catch (Exception e) { + if (e.getMessage()!= errorMessage) { + throw e + } + } + } + String getBrokerName() { String brokerName = context.config.otherConfigs.get("brokerName") return brokerName