From 34f55fe3f7e3ec47735f402c9c45ed6d2bee8873 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Thu, 2 Jun 2022 15:02:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E3=80=90=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95=E3=80=91=E5=9C=BA?= =?UTF-8?q?=E6=99=AF-=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E8=AF=B7=E6=B1=82-dubbo=E7=B1=BB=E5=9E=8B=EF=BC=8C=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1013747 --user=宋天阳 【接口测试】场景-添加自定义请求-dubbo类型,执行失败 {#_orginal_url#} --- .../dto/definition/request/sampler/MsDubboSampler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsDubboSampler.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsDubboSampler.java index e4f93d91cd..42f9b380c8 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsDubboSampler.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsDubboSampler.java @@ -87,7 +87,7 @@ public class MsDubboSampler extends MsTestElement { // 非导出操作,且不是启用状态则跳过执行 if (!config.isOperating() && !this.isEnable()) { return; - }else if(config.isOperating() && StringUtils.isNotEmpty(config.getOperatingSampleTestName())){ + } else if (config.isOperating() && StringUtils.isNotEmpty(config.getOperatingSampleTestName())) { this.setName(config.getOperatingSampleTestName()); } if (this.getReferenced() != null && "Deleted".equals(this.getReferenced())) { @@ -112,9 +112,9 @@ public class MsDubboSampler extends MsTestElement { //处理全局前后置脚本(步骤内) String environmentId = this.getEnvironmentId(); if (environmentId == null) { - if(StringUtils.isEmpty(this.useEnvironment) && envConfig != null){ + if (StringUtils.isEmpty(this.useEnvironment) && envConfig != null) { environmentId = envConfig.getApiEnvironmentid(); - }else { + } else { environmentId = this.useEnvironment; } } @@ -215,7 +215,7 @@ public class MsDubboSampler extends MsTestElement { private ConfigTestElement configCenter(MsConfigCenter configCenter) { ConfigTestElement configTestElement = new ConfigTestElement(); - if (configCenter != null && configCenter.getProtocol() != null && configCenter.getUsername() != null && configCenter.getPassword() != null) { + if (configCenter != null && StringUtils.isNotEmpty(configCenter.getAddress()) && StringUtils.isNotEmpty(configCenter.getProtocol()) && StringUtils.isNotEmpty(configCenter.getUsername()) && StringUtils.isNotEmpty(configCenter.getPassword())) { Constants.setConfigCenterProtocol(configCenter.getProtocol(), configTestElement); Constants.setConfigCenterGroup(configCenter.getGroup(), configTestElement); Constants.setConfigCenterNamespace(configCenter.getNamespace(), configTestElement);