From 37a6e78fbb75dc1a695460162eab123baa904aac Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Tue, 3 Aug 2021 18:32:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E8=8E=B7=E5=8F=96=E7=8E=AF=E5=A2=83ID=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E5=AF=BC=E8=87=B4=E7=9A=84=E5=90=8E=E7=BB=AD=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20#1005595?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1005315 --user=宋天阳 【环境参数】串行执行场景,环境参数没引用到 https://www.tapd.cn/55049933/s/1031911 --- .../definition/request/sampler/MsHTTPSamplerProxy.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java index 9a20645c6e..649d5d755d 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java @@ -254,10 +254,13 @@ public class MsHTTPSamplerProxy extends MsTestElement { if (CollectionUtils.isNotEmpty(hashTree)) { for (MsTestElement el : hashTree) { - if (this.getEnvironmentId() == null || el.getEnvironmentId() == null) { - el.setEnvironmentId(useEnvironment); + if(el.getEnvironmentId() == null){ + if(this.getEnvironmentId() == null){ + el.setEnvironmentId(useEnvironment); + }else{ + el.setEnvironmentId(this.getEnvironmentId()); + } } - el.toHashTree(httpSamplerTree, el.getHashTree(), config); } }