fix(接口测试): 修复LengthPrefixedBinaryTCPClient无法发送报文的问题
--bug=1011019 --user=宋天阳 【接口测试】github#11306,TCP请求,同样的参数在接口定义、快捷调试和接口自动化中的响应结果不一样,并且把场景中的TCP请求另存为接口存在显示问题 https://www.tapd.cn/55049933/s/1125965
This commit is contained in:
parent
0687387326
commit
47b8aeaefe
|
@ -273,7 +273,14 @@ public class MsTCPSampler extends MsTestElement {
|
|||
tcpSampler.setProperty(TCPSampler.NODELAY, this.isNodelay());
|
||||
tcpSampler.setCloseConnection(String.valueOf(this.isCloseConnection()));
|
||||
tcpSampler.setSoLinger(this.getSoLinger());
|
||||
|
||||
if(StringUtils.equalsIgnoreCase("LengthPrefixedBinaryTCPClientImpl",this.classname)){
|
||||
//LengthPrefixedBinaryTCPClientImpl取样器不可以设置eolByte
|
||||
this.eolByte = null;
|
||||
}else {
|
||||
tcpSampler.setEolByte(this.getEolByte());
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(this.timeout)) {
|
||||
tcpSampler.setTimeout(this.timeout);
|
||||
}
|
||||
|
@ -380,7 +387,9 @@ public class MsTCPSampler extends MsTestElement {
|
|||
configTestElement.setProperty(TCPSampler.NODELAY, this.isNodelay());
|
||||
configTestElement.setProperty(TCPSampler.CLOSE_CONNECTION, this.isCloseConnection());
|
||||
configTestElement.setProperty(TCPSampler.SO_LINGER, this.getSoLinger());
|
||||
if(!StringUtils.equalsIgnoreCase("LengthPrefixedBinaryTCPClientImpl",this.classname)){
|
||||
configTestElement.setProperty(TCPSampler.EOL_BYTE, this.getEolByte());
|
||||
}
|
||||
configTestElement.setProperty(TCPSampler.SO_LINGER, this.getSoLinger());
|
||||
configTestElement.setProperty(ConfigTestElement.USERNAME, this.getUsername());
|
||||
configTestElement.setProperty(ConfigTestElement.PASSWORD, this.getPassword());
|
||||
|
|
|
@ -39,10 +39,8 @@ public class ApiScenarioReportResultService {
|
|||
if (StringUtils.isNotEmpty(item.getName()) && item.getName().startsWith("Transaction=") && CollectionUtils.isEmpty(item.getSubRequestResults())) {
|
||||
LoggerUtil.debug("合并事物请求暂不入库");
|
||||
} else {
|
||||
if (!StringUtils.startsWithAny(item.getName(), "PRE_PROCESSOR_ENV_", "POST_PROCESSOR_ENV_")) {
|
||||
apiScenarioReportResultMapper.insert(this.newApiScenarioReportResult(reportId, item));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue