refactor(接口测试): 优化更新执行结果方法
This commit is contained in:
parent
da2846edef
commit
1f5e80efd7
|
@ -176,7 +176,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="stopScenario">
|
<update id="stopScenario">
|
||||||
update api_scenario_report set status ='STOP' where
|
update api_scenario_report set status ='STOP' where status in ("running","starting","waiting") and
|
||||||
project_id in
|
project_id in
|
||||||
<foreach collection="request.projects" item="id" separator="," open="(" close=")">
|
<foreach collection="request.projects" item="id" separator="," open="(" close=")">
|
||||||
#{id}
|
#{id}
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
|
|
||||||
|
|
||||||
<update id="stopApi">
|
<update id="stopApi">
|
||||||
update api_definition_exec_result set status ='STOP' where
|
update api_definition_exec_result set status ='STOP' where status in ("running","starting","waiting") and
|
||||||
project_id in
|
project_id in
|
||||||
<foreach collection="request.projects" item="id" separator="," open="(" close=")">
|
<foreach collection="request.projects" item="id" separator="," open="(" close=")">
|
||||||
#{id}
|
#{id}
|
||||||
|
|
|
@ -193,13 +193,13 @@ public class TaskService {
|
||||||
execThreadPoolExecutor.removeQueue(item.getId());
|
execThreadPoolExecutor.removeQueue(item.getId());
|
||||||
PoolExecBlockingQueueUtil.offer(item.getId());
|
PoolExecBlockingQueueUtil.offer(item.getId());
|
||||||
}
|
}
|
||||||
|
LoggerUtil.info("结束API进行中的报告");
|
||||||
|
extTaskMapper.stopApi(taskCenterRequest);
|
||||||
|
// 清理队列并停止测试计划报告
|
||||||
|
LoggerUtil.info("清理API执行链");
|
||||||
|
List<String> ids = results.stream().map(ApiDefinitionExecResult::getId).collect(Collectors.toList());
|
||||||
|
apiExecutionQueueService.stop(ids);
|
||||||
}
|
}
|
||||||
LoggerUtil.info("结束API进行中的报告");
|
|
||||||
extTaskMapper.stopApi(taskCenterRequest);
|
|
||||||
// 清理队列并停止测试计划报告
|
|
||||||
LoggerUtil.info("清理API执行链");
|
|
||||||
List<String> ids = results.stream().map(ApiDefinitionExecResult::getId).collect(Collectors.toList());
|
|
||||||
apiExecutionQueueService.stop(ids);
|
|
||||||
}
|
}
|
||||||
if (taskRequestMap.containsKey("SCENARIO")) {
|
if (taskRequestMap.containsKey("SCENARIO")) {
|
||||||
List<ApiScenarioReport> reports = extApiScenarioReportMapper.findByProjectIds(taskCenterRequest);
|
List<ApiScenarioReport> reports = extApiScenarioReportMapper.findByProjectIds(taskCenterRequest);
|
||||||
|
|
Loading…
Reference in New Issue