feat(测试跟踪): 批量执行测试计划

--user=郭雨琦
不需要重复检查删除测试计划队列
This commit is contained in:
guoyuqi 2022-04-08 19:07:34 +08:00 committed by xiaomeinvG
parent 91e9a3a701
commit e9f178d8a4
1 changed files with 0 additions and 18 deletions

View File

@ -395,24 +395,6 @@ public class ApiExecutionQueueService {
}
// 清除异常队列/一般是服务突然停止产生
extApiExecutionQueueMapper.delete();
//清除未及时清理的批量执行测试计划的队列
deleteBatchPlanQueue(timeout);
}
private void deleteBatchPlanQueue(long timeout) {
TestPlanReportExample testPlanReportExample = new TestPlanReportExample();
testPlanReportExample.createCriteria().andTriggerModeEqualTo(TriggerMode.BATCH.name());
testPlanReportExample.createCriteria().andCreateTimeLessThan(timeout);
List<String>status = new ArrayList<>();
status.add("COMPLETED");
status.add("Completed");
testPlanReportExample.createCriteria().andStatusIn(status);
List<TestPlanReport> testPlanReports1 = testPlanReportMapper.selectByExample(testPlanReportExample);
List<String> finishedReportIds = testPlanReports1.stream().map(TestPlanReport::getId).collect(Collectors.toList());
TestPlanExecutionQueueExample testPlanExecutionQueueExample = new TestPlanExecutionQueueExample();
testPlanExecutionQueueExample.createCriteria().andCreateTimeLessThan(timeout);
testPlanExecutionQueueExample.createCriteria().andReportIdIn(finishedReportIds);
testPlanExecutionQueueMapper.deleteByExample(testPlanExecutionQueueExample);
}
public void stop(String reportId) {