fix(测试跟踪): 测试计划结束时间到期后,状态没有变成已结束

--bug=1025804 --user=陈建星 【测试跟踪】测试计划-计划结束时间到期后,测试计划状态未更新为已结束 https://www.tapd.cn/55049933/s/1367340
This commit is contained in:
chenjianxing 2023-04-26 18:53:12 +08:00 committed by jianxing
parent 276f05112a
commit 849f3fb856

View File

@ -575,17 +575,17 @@ public class TestPlanService {
failNum++;
}
}
if (passNum == statusList.size()) { // 全部通过
// 到结束时间了不管用例的状态都改为已结束
if (testPlanWithBLOBs.getPlannedEndTime() != null && System.currentTimeMillis() > testPlanWithBLOBs.getPlannedEndTime()) {
testPlanWithBLOBs.setStatus(TestPlanStatus.Finished.name());
editTestPlan(testPlanWithBLOBs);
} else if (prepareNum == 0 && passNum + failNum == statusList.size()) {
// 如果全部都执行完了改为已完成如果已完成之后到结束时间了走上面逻辑改成已结束
testPlanWithBLOBs.setStatus(TestPlanStatus.Completed.name());
this.editTestPlan(testPlanWithBLOBs);
} else if (prepareNum == 0 && passNum + failNum == statusList.size()) { // 已结束
if (testPlanWithBLOBs.getPlannedEndTime() != null && testPlanWithBLOBs.getPlannedEndTime() > System.currentTimeMillis()) {
testPlanWithBLOBs.setStatus(TestPlanStatus.Completed.name());
} else {
testPlanWithBLOBs.setStatus(TestPlanStatus.Finished.name());
}
editTestPlan(testPlanWithBLOBs);
} else if (prepareNum != 0) { // 进行中
} else if (prepareNum != 0) {
// 用例没有执行完并且结束时间没到改为进行中
testPlanWithBLOBs.setStatus(TestPlanStatus.Underway.name());
editTestPlan(testPlanWithBLOBs);
}