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

--bug=1005595 --user=宋天阳 【接口自动化】场景请求头变量中的变量没有更新 {#_orginal_url#}
This commit is contained in:
song-tianyang 2021-08-03 18:13:29 +08:00 committed by 刘瑞斌
parent 6fd05b826d
commit 4dcdebbd8b
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);
}
}