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); + } } }