fix(测试计划): 修复资源池并行执行问题

--bug=1009162 --user=赵勇 【接口测试】测试计划,定时任务,k8s / local资源池执行,并行,接口测试一直running https://www.tapd.cn/55049933/s/1085568
This commit is contained in:
fit2-zhao 2021-12-22 19:11:23 +08:00 committed by song-tianyang
parent 5a209e959d
commit 4c0b392c1b

View File

@ -136,8 +136,13 @@ public class TestPlanApiExecuteService {
JmeterRunRequestDTO runRequest = new JmeterRunRequestDTO(testPlanApiCase.getId(), reportId, request.getTriggerMode(), hashTree); JmeterRunRequestDTO runRequest = new JmeterRunRequestDTO(testPlanApiCase.getId(), reportId, request.getTriggerMode(), hashTree);
if (request.getConfig() != null) { if (request.getConfig() != null) {
runRequest.setPool(GenerateHashTreeUtil.isResourcePool(request.getConfig().getResourcePoolId())); runRequest.setPool(GenerateHashTreeUtil.isResourcePool(request.getConfig().getResourcePoolId()));
runRequest.setPoolId(request.getConfig().getResourcePoolId());
} }
runRequest.setTestPlanReportId(request.getPlanReportId()); runRequest.setTestPlanReportId(request.getPlanReportId());
runRequest.setReportType(executionQueue.getReportType());
runRequest.setTestPlanReportId(request.getPlanReportId());
runRequest.setRunType(RunModeConstants.PARALLEL.toString());
runRequest.setQueueId(executionQueue.getId());
jMeterService.run(runRequest); jMeterService.run(runRequest);
} catch (Exception e) { } catch (Exception e) {
executeErrorList.add(testPlanApiCase.getId()); executeErrorList.add(testPlanApiCase.getId());