fix(接口测试): 修复用例执行未选环境情况报告状态错误
--bug=1009633 --user=赵勇 【接口测试】接口用例列表,批量-串行-执行接口用例,任务中心有一部分用例timeout了 https://www.tapd.cn/55049933/s/1092216
This commit is contained in:
parent
b3ac12a264
commit
e42034a887
|
@ -137,7 +137,7 @@ public class ApiScenarioSerialService {
|
|||
} else {
|
||||
ApiDefinitionExecResult apiDefinitionExecResult = apiDefinitionExecResultMapper.selectByPrimaryKey(queue.getReportId());
|
||||
if (apiDefinitionExecResult != null) {
|
||||
apiDefinitionExecResult.setStatus("timeout");
|
||||
apiDefinitionExecResult.setStatus("Error");
|
||||
apiDefinitionExecResultMapper.updateByPrimaryKey(apiDefinitionExecResult);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,9 +185,11 @@ public class ApiExecutionQueueService {
|
|||
}
|
||||
}
|
||||
if (CollectionUtils.isEmpty(queues)) {
|
||||
LoggerUtil.info("execution complete,clear queue:【" + id + "】");
|
||||
queueMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
} else {
|
||||
LoggerUtil.info("execution complete,clear queue:【" + id + "】");
|
||||
queueMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
}
|
||||
|
@ -299,10 +301,12 @@ public class ApiExecutionQueueService {
|
|||
queues.forEach(item -> {
|
||||
// 更新测试计划报告
|
||||
if (StringUtils.isNotEmpty(item.getReportId())) {
|
||||
LoggerUtil.info("处理不在执行队列中的测试计划报告:【" + item.getReportId() + "】");
|
||||
CommonBeanFactory.getBean(TestPlanReportService.class).finishedTestPlanReport(item.getReportId(), TestPlanReportStatus.COMPLETED.name());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<String> testPlanReports = extApiExecutionQueueMapper.findTestPlanRunningReport();
|
||||
if (CollectionUtils.isNotEmpty(testPlanReports)) {
|
||||
testPlanReports.forEach(reportId -> {
|
||||
|
|
Loading…
Reference in New Issue