Skip to content

Commit

Permalink
[enhancement](sc-test) Optimize waitForSchemeChangeDone (apache#31002)
Browse files Browse the repository at this point in the history
cjj2010 authored Feb 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 77849e2 commit 0407f05
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ import com.google.common.util.concurrent.MoreExecutors
import com.google.gson.Gson
import groovy.json.JsonSlurper
import com.google.common.collect.ImmutableList
import org.apache.commons.lang3.ObjectUtils
import org.apache.doris.regression.Config
import org.apache.doris.regression.action.BenchmarkAction
import org.apache.doris.regression.action.WaitForAction
@@ -522,8 +523,16 @@ class Suite implements GroovyInterceptable {
runAction(new BenchmarkAction(context), actionSupplier)
}

void waitForSchemaChangeDone(Closure actionSupplier) {
void waitForSchemaChangeDone(Closure actionSupplier, String insertSql = null, boolean cleanOperator = false,String tbName=null) {
runAction(new WaitForAction(context), actionSupplier)
if (ObjectUtils.isNotEmpty(insertSql)){
sql insertSql
}
if (cleanOperator==true){
if (ObjectUtils.isEmpty(tbName)) throw new RuntimeException("tbName cloud not be null")
quickTest("", """ SELECT * FROM ${tbName} """)
sql """ DROP TABLE ${tbName} """
}
}

String getBrokerName() {

0 comments on commit 0407f05

Please sign in to comment.