fix(接口自动化): 修复端口是变量的问题
This commit is contained in:
parent
22b63d03df
commit
6db8a133de
|
@ -130,7 +130,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1.8 之前历史数据
|
// 1.8 之前历史数据
|
||||||
if(StringUtils.isEmpty(this.getProjectId()) && config.getConfig()!= null && !config.getConfig().isEmpty()){
|
if (StringUtils.isEmpty(this.getProjectId()) && config.getConfig() != null && !config.getConfig().isEmpty()) {
|
||||||
this.setProjectId("historyProjectID");
|
this.setProjectId("historyProjectID");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,10 +154,11 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
||||||
}
|
}
|
||||||
URL urlObject = new URL(url);
|
URL urlObject = new URL(url);
|
||||||
sampler.setDomain(URLDecoder.decode(urlObject.getHost(), "UTF-8"));
|
sampler.setDomain(URLDecoder.decode(urlObject.getHost(), "UTF-8"));
|
||||||
if (urlObject.getPort() > 0 && urlObject.getPort() != 10990 && StringUtils.isNotEmpty(this.getPort()) && this.getPort().startsWith("${")) {
|
|
||||||
sampler.setPort(urlObject.getPort());
|
if (urlObject.getPort() > 0 && urlObject.getPort() == 10990 && StringUtils.isNotEmpty(this.getPort()) && this.getPort().startsWith("${")) {
|
||||||
} else {
|
|
||||||
sampler.setProperty("HTTPSampler.port", this.getPort());
|
sampler.setProperty("HTTPSampler.port", this.getPort());
|
||||||
|
} else {
|
||||||
|
sampler.setPort(urlObject.getPort());
|
||||||
}
|
}
|
||||||
sampler.setProtocol(urlObject.getProtocol());
|
sampler.setProtocol(urlObject.getProtocol());
|
||||||
sampler.setPath(urlObject.getPath());
|
sampler.setPath(urlObject.getPath());
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2115bd28a90854d2b6276a90878934715498c584
|
Subproject commit 07951ba17aef6f29e50cfd68e40de3266f9a60cd
|
Loading…
Reference in New Issue