feat(接口自动化): 修复场景变量获取环境ID失败导致的后续问题 #1005595

--bug=1005315 --user=宋天阳 【环境参数】串行执行场景,环境参数没引用到
https://www.tapd.cn/55049933/s/1031911
This commit is contained in:
song-tianyang 2021-08-03 18:32:25 +08:00 committed by 刘瑞斌
parent 4c5a27dece
commit 37a6e78fbb
1 changed files with 6 additions and 3 deletions

View File

@ -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);
}
}