From 604a5d68c43fcdab4a21ea61d7c4b43484e7a918 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 24 Nov 2022 13:22:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=8A=A5=E5=91=8A=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=8E=AF=E5=A2=83=E4=BF=A1=E6=81=AF=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan/service/remote/api/PlanTestPlanApiCaseService.java | 6 +++++- .../service/remote/api/PlanTestPlanScenarioCaseService.java | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanApiCaseService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanApiCaseService.java index 6e0412dd8e..ab10578911 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanApiCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanApiCaseService.java @@ -44,7 +44,11 @@ public class PlanTestPlanApiCaseService extends ApiTestService { calculatePlanReport(report, planReportCaseDTOS); //记录接口用例的运行环境信息 List idList = planReportCaseDTOS.stream().map(PlanReportCaseDTO::getId).collect(Collectors.toList()); - report.setProjectEnvMap(getPlanProjectEnvMap(idList)); + try { + report.setProjectEnvMap(getPlanProjectEnvMap(idList)); + } catch (Exception e) { + LogUtil.error(e); + } } } diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanScenarioCaseService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanScenarioCaseService.java index f1f407fe3c..73085f3b74 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanScenarioCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/remote/api/PlanTestPlanScenarioCaseService.java @@ -38,7 +38,11 @@ public class PlanTestPlanScenarioCaseService extends ApiTestService { calculatePlanReport(report, planReportCaseDTOS); //记录接口用例的运行环境信息 List idList = planReportCaseDTOS.stream().map(PlanReportCaseDTO::getId).collect(Collectors.toList()); - report.setProjectEnvMap(getPlanProjectEnvMap(idList)); + try { + report.setProjectEnvMap(getPlanProjectEnvMap(idList)); + } catch (Exception e) { + LogUtil.error(e); + } } }