fix(测试计划状态): 优化测试计划的执行状态检查

优化测试计划的执行状态检查,如果测试计划中包含性能测试,那么不再提前结束任务,以性能测试最终结束时间或测试计划超时时间为准
This commit is contained in:
song-tianyang 2021-12-07 20:45:15 +08:00 committed by song-tianyang
parent 054e0615d3
commit 82a33b4b29
1 changed files with 2 additions and 14 deletions

View File

@ -1188,22 +1188,10 @@ public class TestPlanReportService {
}
if (StringUtils.isNotBlank(testPlanReportContent.getLoadAllCases())) {
reportHasData = true;
List<TestPlanLoadCaseDTO> allCases = JSONObject.parseArray(testPlanReportContent.getLoadAllCases(), TestPlanLoadCaseDTO.class);
for (TestPlanLoadCaseDTO dto : allCases) {
if (StringUtils.equalsIgnoreCase(dto.getStatus(), "run")) {
isUpdate = true;
LoadTestReport report = loadTestReportMapper.selectByPrimaryKey(dto.getReportId());
if (report != null) {
dto.setStatus(report.getStatus());
}
}
if (StringUtils.equalsAnyIgnoreCase("Underway", dto.getStatus(), dto.getStatus())) {
isTaskRunning = true;
}
if(!allCases.isEmpty()){
isTaskRunning = true;
}
testPlanReportContent.setLoadAllCases(JSONArray.toJSONString(allCases));
}
if (isUpdate) {
testPlanReportContentMapper.updateByPrimaryKeyWithBLOBs(testPlanReportContent);