refactor(测试计划): 优化测试计划并发执行快速生成测试计划报告
This commit is contained in:
parent
f7bc3afaa1
commit
6df644acbb
|
@ -21,6 +21,10 @@ public class ApiScenarioParallelService {
|
|||
private JMeterService jMeterService;
|
||||
|
||||
public void parallel(Map<String, RunModeDataDTO> executeQueue, RunScenarioRequest request, String serialReportId, DBTestQueue executionQueue) {
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Thread.currentThread().setName("SCENARIO-PARALLEL-THREAD");
|
||||
for (String reportId : executeQueue.keySet()) {
|
||||
RunModeDataDTO dataDTO = executeQueue.get(reportId);
|
||||
JmeterRunRequestDTO runRequest = new JmeterRunRequestDTO(dataDTO.getTestId(), StringUtils.isNotEmpty(serialReportId) ? serialReportId : reportId, request.getRunMode(), null);
|
||||
|
@ -43,4 +47,7 @@ public class ApiScenarioParallelService {
|
|||
jMeterService.run(runRequest);
|
||||
}
|
||||
}
|
||||
});
|
||||
thread.start();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue