diff --git a/backend/src/main/java/io/metersphere/api/cache/TestPlanReportExecuteCatch.java b/backend/src/main/java/io/metersphere/api/cache/TestPlanReportExecuteCatch.java index fce3972ba8..5035199c49 100644 --- a/backend/src/main/java/io/metersphere/api/cache/TestPlanReportExecuteCatch.java +++ b/backend/src/main/java/io/metersphere/api/cache/TestPlanReportExecuteCatch.java @@ -73,6 +73,7 @@ public class TestPlanReportExecuteCatch { public static synchronized void remove(String reportId){ if(testPlanReportMap.containsKey(reportId)){ + testPlanReportMap.get(reportId).finishAllTask(); testPlanReportMap.remove(reportId); } } diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 3b3ee84e70..6ead921cef 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -1170,7 +1170,7 @@ public class ApiAutomationService { if(report != null && StringUtils.isNotEmpty(request.getTestPlanReportId())){ Map scenarioReportIdMap = new HashMap<>(); scenarioReportIdMap.put(item.getId(),report.getId()); - TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(reportId, null, scenarioReportIdMap, null); + TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(request.getTestPlanReportId(), null, scenarioReportIdMap, null); } } else { report = createScenarioReport(reportId, ExecuteType.Marge.name().equals(request.getExecuteType()) ? serialReportId : item.getId(), item.getName(), request.getTriggerMode(), diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java index 7e3f3b8396..0aecdff590 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java @@ -325,7 +325,7 @@ public class ApiDefinitionExecResultService { } testPlanLog.info("TestPlanReportId[" + testPlanReportId + "] APICASE OVER. API CASE STATUS:" + JSONObject.toJSONString(apiIdResultMap)); TestPlanReportExecuteCatch.updateApiTestPlanExecuteInfo(testPlanReportId, apiIdResultMap, null, null); - TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(testPlanReportId, caseReportMap, null, null); +// TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(testPlanReportId, caseReportMap, null, null); } public void deleteByResourceId(String resourceId) { diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index b959f0f99c..bf0db5beff 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -1188,7 +1188,7 @@ public class TestPlanService { TestPlanReportExecuteCatch.updateApiTestPlanExecuteInfo(planReportId, executeErrorMap, null, null); } if (!executeReportIdMap.isEmpty()) { - TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(planReportId, null, executeReportIdMap, null); + TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(planReportId, executeReportIdMap,null, null); } }); }