fix(接口测试): 修复TCP配置被场景配置覆盖的bug
This commit is contained in:
parent
fea3738797
commit
c13baa2f70
|
@ -1052,10 +1052,21 @@ class JMXTCPRequest {
|
||||||
obj.set(scenario.environment.config.tcpConfig, true);
|
obj.set(scenario.environment.config.tcpConfig, true);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
obj.set(scenario.tcpConfig, true);
|
|
||||||
|
this.copy(this, scenario.tcpConfig);
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
copy(target, source) {
|
||||||
|
for (let key in source) {
|
||||||
|
if (source.hasOwnProperty(key)) {
|
||||||
|
if (source[key] !== undefined && !target[key]) {
|
||||||
|
target[key] = source[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class JMeterTestPlan extends Element {
|
class JMeterTestPlan extends Element {
|
||||||
|
|
Loading…
Reference in New Issue