fix: 修复多线程组设置线程数不正确的bug

This commit is contained in:
Captain.B 2021-01-26 18:53:00 +08:00
parent b5b5d3aa54
commit ffbd3a3ec8
3 changed files with 6 additions and 2 deletions

View File

@ -95,7 +95,7 @@ public class DockerTestEngine extends AbstractEngine {
env.put("BOOTSTRAP_SERVERS", kafkaProperties.getBootstrapServers());
env.put("LOG_TOPIC", kafkaProperties.getLog().getTopic());
env.put("RESOURCE_ID", resource.getId());
env.put("THREAD_NUM", "" + threadNum);
env.put("THREAD_NUM", "0");// 传入0表示不用修改线程数
env.put("HEAP", jmeterProperties.getHeap());

View File

@ -50,6 +50,10 @@ public class JmeterFileService {
}
private void setThreadNum(LoadTestWithBLOBs t, Integer limit) {
// 传入limit才去改这个值
if (limit <= 0) {
return;
}
String loadConfiguration = t.getLoadConfiguration();
JSONArray jsonArray = JSON.parseArray(loadConfiguration);
for (int i = 0; i < jsonArray.size(); i++) {

@ -1 +1 @@
Subproject commit ed891ee7503cc1ca4679b4779a5c12e2ffee986d
Subproject commit bb9ad600f10ff2dd9c3d364a7b30b1926dc2a74f