From 1f2b0b7de9a3d6b125393dbe2d94e82fe893435a Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Fri, 10 Dec 2021 15:14:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=8A=A5=E5=91=8A):=20=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=8A=A5=E5=91=8A=E4=B8=AD=E6=80=A7=E8=83=BD?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E6=89=A7=E8=A1=8C=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E6=97=B6=E6=98=BE=E7=A4=BA=E6=9C=AA=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复测试计划报告中性能测试用例执行成功时显示未执行的问题 --- .../io/metersphere/api/cache/TestPlanReportExecuteCatch.java | 5 +++++ .../io/metersphere/track/service/TestPlanReportService.java | 1 + .../view/comonents/report/detail/component/LoadResult.vue | 3 +++ 3 files changed, 9 insertions(+) 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 518556b70f..d1161c02fb 100644 --- a/backend/src/main/java/io/metersphere/api/cache/TestPlanReportExecuteCatch.java +++ b/backend/src/main/java/io/metersphere/api/cache/TestPlanReportExecuteCatch.java @@ -1,5 +1,8 @@ package io.metersphere.api.cache; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.util.HashMap; import java.util.Map; @@ -8,6 +11,7 @@ import java.util.Map; * @Date 2021/8/20 3:29 下午 */ public class TestPlanReportExecuteCatch { + private static Logger testPlanLog = LoggerFactory.getLogger("testPlanExecuteLog"); private static Map testPlanReportMap = new HashMap<>(); private TestPlanReportExecuteCatch() { @@ -88,6 +92,7 @@ public class TestPlanReportExecuteCatch { } public static void finishAllTask(String planReportId) { + testPlanLog.info("ReportId["+planReportId+"] finish task!"); if(testPlanReportMap.containsKey(planReportId)){ testPlanReportMap.get(planReportId).finishAllTask(); } diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java index dd4c4da761..7d4d05ab7f 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java @@ -1239,6 +1239,7 @@ public class TestPlanReportService { //20分钟没有案例执行结果更新,则定位超时 long lastCountTime = executeInfo.getLastFinishedNumCountTime(); long nowTime = System.currentTimeMillis(); + testPlanLog.info("ReportId: ["+planReportId+"]; timeCount:"+ (nowTime - lastCountTime)); if (nowTime - lastCountTime > 1200000) { return true; } diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadResult.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadResult.vue index 1203ed26bd..2d7bd983b1 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadResult.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/LoadResult.vue @@ -21,7 +21,10 @@ export default { return { caseDataMap: new Map([ ["success", {name: this.$t('test_track.plan_view.pass'), itemStyle: {color: '#67C23A'}}], + ["Success", {name: this.$t('test_track.plan_view.pass'), itemStyle: {color: '#67C23A'}}], + ["SUCCESS", {name: this.$t('test_track.plan_view.pass'), itemStyle: {color: '#67C23A'}}], ["error", {name: this.$t('test_track.plan_view.failure'), itemStyle: {color: '#F56C6C'}}], + ["Error", {name: this.$t('test_track.plan_view.failure'), itemStyle: {color: '#F56C6C'}}], ["run", {name: this.$t('运行中'), itemStyle: {color: '#DEDE10'}}], ["Prepare", {name: this.$t('api_test.home_page.detail_card.unexecute'), itemStyle: {color: '#909399'}}], ]),