revert(UI自动化): 修复任务中心全部停止问题

This commit is contained in:
fit2-zhao 2022-10-18 16:00:22 +08:00 committed by fit2-zhao
parent 84a9435393
commit 93b6d84b34
1 changed files with 2 additions and 2 deletions

View File

@ -85,13 +85,13 @@ public class TaskService {
if (CollectionUtils.isNotEmpty(reportIds)) {
// 任务中心单条停止/全部停止
Map<String, TaskRequestDTO> taskRequestMap = reportIds.stream().collect(Collectors.toMap(TaskRequestDTO::getType, taskRequest -> taskRequest));
if (taskRequestMap.containsKey(API)) {
if (taskRequestMap.containsKey(API) || taskRequestMap.containsKey(SCENARIO)) {
microService.postForData(MicroServiceName.API_TEST, "/api/automation/stop/batch", reportIds);
}
if (taskRequestMap.containsKey(PERF)) {
microService.postForData(MicroServiceName.PERFORMANCE_TEST, "/performance/stop/batch", taskRequestMap.get(PERF));
}
if(taskRequestMap.containsKey(UI) || taskRequestMap.containsKey(SCENARIO)) {
if(taskRequestMap.containsKey(UI)){
microService.postForData(MicroServiceName.UI_TEST, "/ui/automation/stop/batch", reportIds);
}
}