Skip to content

Commit

Permalink
clear test log
Browse files Browse the repository at this point in the history
  • Loading branch information
liuqiyuan committed Dec 14, 2023
1 parent 04baed9 commit 2f98eb4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public void run() {
String className = Thread.currentThread().getStackTrace()[2].getClassName();
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
System.out.println(className+"."+methodName+":"+ sqlCase.getCaseFileName()+":"+ sqlCase.getDesc() + " Begin!");
log.info(className+"."+methodName+":"+ sqlCase.getDesc() + " Begin!");
boolean verify = false;
try {
verify = verify();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,13 @@ public void check() throws Exception {
}
@Override
public void tearDown() {
tearDown("mainVersion",executor);
if(MapUtils.isNotEmpty(executorMap)) {
executorMap.entrySet().stream().forEach(e -> tearDown(e.getKey(), e.getValue()));
}
}


public void tearDown(String version,SqlExecutor executor) {
log.info("version:{},begin tear down",version);
List<String> tearDown = sqlCase.getTearDown();
if(CollectionUtils.isNotEmpty(tearDown)){
tearDown.forEach(sql->{
Expand All @@ -132,7 +130,6 @@ public void tearDown(String version,SqlExecutor executor) {
SDKUtil.sql(executor, dbName, sql);
});
}
log.info("version:{},begin drop table",version);
List<InputDesc> tables = sqlCase.getInputs();
if (CollectionUtils.isEmpty(tables)) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public boolean verify() {

@Override
public void prepare(String version,SqlExecutor executor){
log.info("version:{} prepare begin",version);

sdkClient.createAndUseDB(dbName);
sdkClient.setOnline();
boolean useFirstInputAsRequests = false;
Expand Down Expand Up @@ -119,12 +119,10 @@ public void prepare(String version,SqlExecutor executor){
}
}

log.info("version:{} prepare end",version);
}

@Override
public OpenMLDBResult execute(String version, SqlExecutor executor){
log.info("version:{} execute begin",version);
sdkClient.useDB(dbName);
OpenMLDBResult openMLDBResult = null;
List<String> sqls = sqlCase.getSqls();
Expand All @@ -150,7 +148,6 @@ public OpenMLDBResult execute(String version, SqlExecutor executor){
// openMLDBResult = SDKUtil.sql(executor, dbName, sql);
openMLDBResult = sdkClient.execute(sql);
}
log.info("version:{} execute end",version);
return openMLDBResult;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static SDKClient of(SqlExecutor executor){
return new SDKClient(executor);
}
public OpenMLDBResult execute(String sql) {
log.info("execute sql:{}",sql);
log.info("execute sql:{}",sql.replaceAll("\\n", "\\r"));
OpenMLDBResult openMLDBResult = new OpenMLDBResult();
openMLDBResult.setSql(sql);
try {
Expand Down
6 changes: 3 additions & 3 deletions test/steps/openmldb-sdk-test-java-src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ echo "deploy config:"
cat ${deployConfigPath}
# install command tool
cd test/test-tool/command-tool || exit
mvn clean install -Dmaven.test.skip=true
mvn clean install -B -Dmaven.test.skip=true
cd "${ROOT_DIR}" || exit
# modify config
sh test/steps/modify_java_sdk_config.sh "${CASE_XML}" "${DEPLOY_MODE}" "${JAVA_SDK_VERSION}" "" "${OPENMLDB_SERVER_VERSION}" "${JAVA_NATIVE_VERSION}" "${TABLE_STORAGE_MODE}"

# install jar
cd test/integration-test/openmldb-test-java || exit
mvn clean install -Dmaven.test.skip=true
mvn clean install -B -Dmaven.test.skip=true
cd "${ROOT_DIR}" || exit
# run case
cd "${ROOT_DIR}"/test/integration-test/openmldb-test-java/openmldb-sdk-test || exit
mvn clean test -e -U -DsuiteXmlFile=test_suite/"${CASE_XML}" -DcaseLevel="${CASE_LEVEL}"
mvn clean test -B -e -U -DsuiteXmlFile=test_suite/"${CASE_XML}" -DcaseLevel="${CASE_LEVEL}"

0 comments on commit 2f98eb4

Please sign in to comment.