From e89ce78f49ebf93fd37c8dfce0640f2293b4df2d Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Wed, 24 Nov 2021 15:33:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E8=B5=84=E6=BA=90=E6=B1=A0=E6=89=A7=E8=A1=8C=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=97=B6=E6=8E=A5=E5=8F=A3=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E4=B8=8D=E6=89=A7=E8=A1=8C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1008307 --user=宋天阳 【node资源池】测试计划资源池运行,一直running https://www.tapd.cn/55049933/s/1074191 --- .../io/metersphere/api/service/ApiJmeterFileService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiJmeterFileService.java b/backend/src/main/java/io/metersphere/api/service/ApiJmeterFileService.java index a0db59aefe..bc9b9b39e0 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiJmeterFileService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiJmeterFileService.java @@ -60,7 +60,7 @@ public class ApiJmeterFileService { if (StringUtils.isNotEmpty(testPlanScenarioId)) { // 获取场景用例单独的执行环境 TestPlanApiScenario planApiScenario = testPlanApiScenarioMapper.selectByPrimaryKey(testPlanScenarioId); - if(planApiScenario != null){ + if (planApiScenario != null) { String environment = planApiScenario.getEnvironment(); if (StringUtils.isNotBlank(environment)) { planEnvMap = JSON.parseObject(environment, Map.class); @@ -68,9 +68,9 @@ public class ApiJmeterFileService { } } HashTree hashTree; - if (ApiRunMode.DEFINITION.name().equals(runMode) || ApiRunMode.API_PLAN.name().equals(runMode) || ApiRunMode.MANUAL_PLAN.name().equals(runMode)) { + if (StringUtils.equalsAnyIgnoreCase(runMode, ApiRunMode.DEFINITION.name(), ApiRunMode.API_PLAN.name(), ApiRunMode.SCHEDULE_API_PLAN.name(), ApiRunMode.MANUAL_PLAN.name())) { String testId = remoteTestId; - if(remoteTestId.contains(":")){ + if (remoteTestId.contains(":")) { //执行测试计划案例时会有拼接ID,ID为 planTestCaseId:测试计划报告ID testId = remoteTestId.split(":")[0]; }