fix(接口测试): 解决TCP协议导入其他设置丢失数据问题

--user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001017921
This commit is contained in:
guoyuqi 2022-10-26 15:15:08 +08:00 committed by 刘瑞斌
parent 8adb5b1cbc
commit aff77194e6
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,6 @@ public class JmeterDefinitionParser extends ApiImportAbstractParser<ApiDefinitio
apiDefinition.setName(element.getName());
apiDefinition.setProjectId(this.projectId);
apiDefinition.setRequest(JSON.toJSONString(element));
apiDefinition.setModulePath("/" + this.planName);
// todo 除HTTP协议外其它协议设置默认模块
apiDefinition.setStatus("Prepare");
@ -551,6 +550,7 @@ public class JmeterDefinitionParser extends ApiImportAbstractParser<ApiDefinitio
msTCPSampler.setServer(tcpSampler.getServer());
msTCPSampler.setPort(tcpSampler.getPort() + "");
msTCPSampler.setCtimeout(tcpSampler.getConnectTimeout() + "");
msTCPSampler.setClassname(tcpSampler.getProperty(TCPSampler.CLASSNAME).getStringValue());
msTCPSampler.setReUseConnection(tcpSampler.getProperty(TCPSampler.RE_USE_CONNECTION).getBooleanValue());
msTCPSampler.setNodelay(tcpSampler.getProperty(TCPSampler.NODELAY).getBooleanValue());
msTCPSampler.setCloseConnection(tcpSampler.isCloseConnection());