fix(接口测试): 修复接口执行模块匹配多出端口问题
--bug=1010400 --user=赵勇 【接口测试】环境模块匹配,匹配不到域名的接口,调试的时候多了个端口号 https://www.tapd.cn/55049933/s/1105831
This commit is contained in:
parent
0ea9c0b748
commit
b484e56eb5
|
@ -421,14 +421,15 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
||||||
if (StringUtils.isNotBlank(this.getPath())) {
|
if (StringUtils.isNotBlank(this.getPath())) {
|
||||||
envPath += this.getPath();
|
envPath += this.getPath();
|
||||||
}
|
}
|
||||||
|
sampler.setPort(httpConfig.getPort());
|
||||||
if (StringUtils.isNotEmpty(httpConfig.getDomain())) {
|
if (StringUtils.isNotEmpty(httpConfig.getDomain())) {
|
||||||
sampler.setDomain(URLDecoder.decode(httpConfig.getDomain(), "UTF-8"));
|
sampler.setDomain(URLDecoder.decode(httpConfig.getDomain(), "UTF-8"));
|
||||||
sampler.setProtocol(httpConfig.getProtocol());
|
sampler.setProtocol(httpConfig.getProtocol());
|
||||||
} else {
|
} else {
|
||||||
sampler.setDomain("");
|
sampler.setDomain("");
|
||||||
sampler.setProtocol("");
|
sampler.setProtocol("");
|
||||||
|
sampler.setPort(-1);
|
||||||
}
|
}
|
||||||
sampler.setPort(httpConfig.getPort());
|
|
||||||
} else {
|
} else {
|
||||||
URL urlObject = new URL(this.path);
|
URL urlObject = new URL(this.path);
|
||||||
envPath = StringUtils.equals(urlObject.getPath(), "/") ? "" : urlObject.getFile();
|
envPath = StringUtils.equals(urlObject.getPath(), "/") ? "" : urlObject.getFile();
|
||||||
|
|
Loading…
Reference in New Issue