From 5d5ef4baff92a742df3a5e9ff2328844cc8eaf4b Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Thu, 26 Aug 2021 11:08:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92,?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20#1006013=20=E3=80=90?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E3=80=91=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E8=AE=A1=E5=88=92=EF=BC=8C=E6=9F=A5=E7=9C=8B=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=EF=BC=8C=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=EF=BC=9B=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=A1=B9=E7=9B=AE=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1006013 --user=宋天阳 【测试计划】执行计划,查看测试报告,报告页面异常 https://www.tapd.cn/55049933/s/1040472;系统设置删除项目报错 --- .../main/java/io/metersphere/service/ProjectService.java | 6 +++++- .../java/io/metersphere/track/service/TestPlanService.java | 2 +- .../report/detail/component/ApiCaseFailureResult.vue | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/service/ProjectService.java b/backend/src/main/java/io/metersphere/service/ProjectService.java index 08587ef17a..f1057a0fad 100644 --- a/backend/src/main/java/io/metersphere/service/ProjectService.java +++ b/backend/src/main/java/io/metersphere/service/ProjectService.java @@ -194,7 +194,11 @@ public class ProjectService { deleteProjectUserGroup(projectId); //关闭TCP - this.closeMockTcp(projectId); + try { + //捕获关闭失败的异常,使其不影响删除 + this.closeMockTcp(projectId); + }catch (Exception e){} + // delete project projectMapper.deleteByPrimaryKey(projectId); 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 8286425c79..637294ad1d 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -990,7 +990,6 @@ public class TestPlanService { @Transactional(propagation = Propagation.NOT_SUPPORTED) public String run(String testPlanID, String projectID, String userId, String triggerMode, String apiRunConfig) { - triggerMode = ReportTriggerMode.SCHEDULE.name(); //创建测试报告,然后返回的ID重新赋值为resourceID,作为后续的参数 TestPlanScheduleReportInfoDTO reportInfoDTO = testPlanReportService.genTestPlanReportBySchedule(projectID, testPlanID, userId, triggerMode); @@ -1647,6 +1646,7 @@ public class TestPlanService { buildApiReport(report, config, executeInfo, planId, saveResponse); buildLoadReport(report, config, executeInfo, planId, saveResponse); + report.setEndTime(System.currentTimeMillis()); return report; }else { return null; diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCaseFailureResult.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCaseFailureResult.vue index 47f649c04a..d6c3632fb2 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCaseFailureResult.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiCaseFailureResult.vue @@ -98,6 +98,8 @@ export default { apiCases() { if (this.apiCases) { this.$emit('setSize', this.apiCases.length); + } else { + this.apiCases = []; } } },