fix (接口自动化): 修复DNSCacheManager问题 #1006114
--bug=1006114 --user=赵勇 【github#5508】项目设... https://www.tapd.cn/55049933/s/1038606
This commit is contained in:
parent
266f1b744d
commit
effa648e7b
|
@ -38,7 +38,9 @@ public class MsDNSCacheManager extends MsTestElement {
|
||||||
|
|
||||||
public static void addEnvironmentVariables(HashTree samplerHashTree, String name, EnvironmentConfig config) {
|
public static void addEnvironmentVariables(HashTree samplerHashTree, String name, EnvironmentConfig config) {
|
||||||
name += "Environment Variables";
|
name += "Environment Variables";
|
||||||
samplerHashTree.add(arguments(name, config.getCommonConfig().getVariables()));
|
if (CollectionUtils.isNotEmpty(config.getCommonConfig().getVariables())) {
|
||||||
|
samplerHashTree.add(arguments(name, config.getCommonConfig().getVariables()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addEnvironmentDNS(HashTree samplerHashTree, String name, EnvironmentConfig config, HttpConfig httpConfig) {
|
public static void addEnvironmentDNS(HashTree samplerHashTree, String name, EnvironmentConfig config, HttpConfig httpConfig) {
|
||||||
|
@ -54,7 +56,9 @@ public class MsDNSCacheManager extends MsTestElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
samplerHashTree.add(dnsCacheManager(name + " DNSCacheManager", hosts));
|
if (CollectionUtils.isNotEmpty(hosts)) {
|
||||||
|
samplerHashTree.add(dnsCacheManager(name + " DNSCacheManager", hosts));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,6 +82,7 @@ public class MsDNSCacheManager extends MsTestElement {
|
||||||
dnsCacheManager.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("DNSCachePanel"));
|
dnsCacheManager.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("DNSCachePanel"));
|
||||||
dnsCacheManager.setCustomResolver(true);
|
dnsCacheManager.setCustomResolver(true);
|
||||||
hosts.forEach(host -> dnsCacheManager.addHost(host.getDomain(), host.getIp()));
|
hosts.forEach(host -> dnsCacheManager.addHost(host.getDomain(), host.getIp()));
|
||||||
|
hosts.forEach(host -> dnsCacheManager.addServer(host.getIp()));
|
||||||
|
|
||||||
return dnsCacheManager;
|
return dnsCacheManager;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue