From 116af643eca2aa07cd529965955d7844f5e629f7 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Wed, 22 Sep 2021 11:54:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92)=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E9=97=AE=E9=A2=98=20#1155049933001006736=20--bug=3D10?= =?UTF-8?q?06736=20--user=3D=E8=B5=B5=E5=8B=87=20=E3=80=90=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=AE=A1=E5=88=92=E3=80=91=E6=B5=8B=E8=AF=95=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E4=B8=AD=E6=89=B9=E9=87=8F=E6=89=A7=E8=A1=8C=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E6=9C=AA=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=20https://www.tapd.cn/55049933/s/1048987?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/api/service/task/SerialScenarioExecTask.java | 4 ++-- .../io/metersphere/track/service/TestPlanApiCaseService.java | 2 +- .../io/metersphere/track/service/task/SerialApiExecTask.java | 4 ++-- frontend/src/business/components/task/TaskCenter.vue | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/task/SerialScenarioExecTask.java b/backend/src/main/java/io/metersphere/api/service/task/SerialScenarioExecTask.java index d8a090704d..0151101252 100644 --- a/backend/src/main/java/io/metersphere/api/service/task/SerialScenarioExecTask.java +++ b/backend/src/main/java/io/metersphere/api/service/task/SerialScenarioExecTask.java @@ -34,7 +34,7 @@ public class SerialScenarioExecTask implements Callable { @Override public T call() { try { - if (MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) { + if (runModeDataDTO.getReport()!=null && MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) { MessageCache.terminationOrderDeque.remove(runModeDataDTO.getReport().getId()); return null; } @@ -52,7 +52,7 @@ public class SerialScenarioExecTask implements Callable { if (report != null && !report.getStatus().equals(APITestStatus.Running.name())) { break; } - if (MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) { + if (runModeDataDTO.getReport()!=null && MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) { MessageCache.terminationOrderDeque.remove(runModeDataDTO.getReport().getId()); break; } diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanApiCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanApiCaseService.java index 2a5e883828..1971ec0367 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanApiCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanApiCaseService.java @@ -421,7 +421,7 @@ public class TestPlanApiCaseService { public void run() { for (TestPlanApiCase testPlanApiCase : executeQueue.keySet()) { try { - if (MessageCache.terminationOrderDeque.contains(executeQueue.get(testPlanApiCase).getId())) { + if (executeQueue.get(testPlanApiCase)!=null && MessageCache.terminationOrderDeque.contains(executeQueue.get(testPlanApiCase).getId())) { MessageCache.terminationOrderDeque.remove(executeQueue.get(testPlanApiCase).getId()); break; } diff --git a/backend/src/main/java/io/metersphere/track/service/task/SerialApiExecTask.java b/backend/src/main/java/io/metersphere/track/service/task/SerialApiExecTask.java index 71658ff350..f78bb3c1eb 100644 --- a/backend/src/main/java/io/metersphere/track/service/task/SerialApiExecTask.java +++ b/backend/src/main/java/io/metersphere/track/service/task/SerialApiExecTask.java @@ -34,7 +34,7 @@ public class SerialApiExecTask implements Callable { @Override public T call() { try { - if (MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) { + if (runModeDataDTO.getReport()!=null && MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) { MessageCache.terminationOrderDeque.remove(runModeDataDTO.getReport().getId()); return null; } @@ -53,7 +53,7 @@ public class SerialApiExecTask implements Callable { if (report != null && !report.getStatus().equals(APITestStatus.Running.name())) { break; } - if (MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) { + if (runModeDataDTO.getReport()!=null && MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) { MessageCache.terminationOrderDeque.remove(runModeDataDTO.getReport().getId()); break; } diff --git a/frontend/src/business/components/task/TaskCenter.vue b/frontend/src/business/components/task/TaskCenter.vue index 7720f5c076..c624aeb8ae 100644 --- a/frontend/src/business/components/task/TaskCenter.vue +++ b/frontend/src/business/components/task/TaskCenter.vue @@ -237,7 +237,7 @@ export default { let taskTotal = e.data; this.runningTotal = taskTotal; this.initIndex++; - if (this.taskVisible && taskTotal > 0 && this.initEnd) { + if (this.taskVisible && this.initEnd) { setTimeout(() => { this.initEnd = false; this.init();