From 9818ea20fe9b461fe6c06a58db4b8ccadb865d10 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Fri, 26 Mar 2021 18:59:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20jenkins=E8=A7=A6=E5=8F=91=E7=9A=84?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E5=92=8C=E5=9C=BA=E6=99=AF=E6=8A=A5=E5=91=8A=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/api/jmeter/APIBackendListenerClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java index b7886c9379..b8639fbd0e 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java @@ -198,11 +198,11 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl apiDefinitionService.addResult(testResult); //测试计划定时任务-接口执行逻辑的话,需要同步测试计划的报告数据 - if (StringUtils.equals(this.runMode, ApiRunMode.SCHEDULE_API_PLAN.name())) { + if (StringUtils.equalsAny(this.runMode, ApiRunMode.SCHEDULE_API_PLAN.name(), ApiRunMode.JENKINS_API_PLAN.name())) { apiDefinitionExecResultService.saveApiResultByScheduleTask(testResult, ApiRunMode.SCHEDULE_API_PLAN.name()); List testPlanReportIdList = new ArrayList<>(); testPlanReportIdList.add(debugReportId); - for(String testPlanReportId : testPlanReportIdList) { // 更新每个测试计划的状态 + for (String testPlanReportId : testPlanReportIdList) { // 更新每个测试计划的状态 testPlanReportService.checkTestPlanStatus(testPlanReportId); } testPlanReportService.updateReport(testPlanReportIdList, ApiRunMode.SCHEDULE_API_PLAN.name(), ReportTriggerMode.SCHEDULE.name());