mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 21:19:52 +08:00
fix(测试跟踪): 测试计划结束时间到期后,状态没有变成已结束
--bug=1025804 --user=陈建星 【测试跟踪】测试计划-计划结束时间到期后,测试计划状态未更新为已结束 https://www.tapd.cn/55049933/s/1367340
This commit is contained in:
parent
276f05112a
commit
849f3fb856
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user