fix(测试计划): 修复测试计划使用资源池执行定时任务时接口用例不执行的问题

--bug=1008307 --user=宋天阳 【node资源池】测试计划资源池运行,一直running
https://www.tapd.cn/55049933/s/1074191
This commit is contained in:
song-tianyang 2021-11-24 15:33:20 +08:00 committed by song-tianyang
parent 170ddeeaca
commit e89ce78f49
1 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ public class ApiJmeterFileService {
if (StringUtils.isNotEmpty(testPlanScenarioId)) {
// 获取场景用例单独的执行环境
TestPlanApiScenario planApiScenario = testPlanApiScenarioMapper.selectByPrimaryKey(testPlanScenarioId);
if(planApiScenario != null){
if (planApiScenario != null) {
String environment = planApiScenario.getEnvironment();
if (StringUtils.isNotBlank(environment)) {
planEnvMap = JSON.parseObject(environment, Map.class);
@ -68,9 +68,9 @@ public class ApiJmeterFileService {
}
}
HashTree hashTree;
if (ApiRunMode.DEFINITION.name().equals(runMode) || ApiRunMode.API_PLAN.name().equals(runMode) || ApiRunMode.MANUAL_PLAN.name().equals(runMode)) {
if (StringUtils.equalsAnyIgnoreCase(runMode, ApiRunMode.DEFINITION.name(), ApiRunMode.API_PLAN.name(), ApiRunMode.SCHEDULE_API_PLAN.name(), ApiRunMode.MANUAL_PLAN.name())) {
String testId = remoteTestId;
if(remoteTestId.contains(":")){
if (remoteTestId.contains(":")) {
//执行测试计划案例时会有拼接ID,ID为 planTestCaseId:测试计划报告ID
testId = remoteTestId.split(":")[0];
}