fix(测试跟踪): 修复测试计划执行时取消使用资源池,但是依然会根据下拉框选择的资源池进行执行的问题

--bug=1025386 --user=宋天阳 【测试跟踪】github #23610,测试计划执行,资源池取消勾选,选中的资源池未清空
https://www.tapd.cn/55049933/s/1362869
This commit is contained in:
建国 2023-04-14 15:00:21 +08:00 committed by 建国
parent 7075861db8
commit 269184fe2c
2 changed files with 13 additions and 0 deletions

View File

@ -119,6 +119,14 @@
<span>{{ fileBranch }}</span>
</el-form-item>
<el-form-item
v-if="isRepositoryFile()"
:label="$t('project.project_file.file.path')"
prop="type"
>
<span>{{ data.path }}</span>
</el-form-item>
<el-form-item :label="$t('load_test.file_type')" prop="type">
<span>{{ data.type }}</span>
</el-form-item>

View File

@ -2000,6 +2000,11 @@ public class TestPlanService {
RunModeConfigDTO runModeConfig = getRunModeConfigDTO(testplanRunRequest, envType, envMap, environmentGroupId, testPlanId);
runModeConfig.setTestPlanDefaultEnvMap(testplanRunRequest.getTestPlanDefaultEnvMap());
if (!testplanRunRequest.isRunWithinResourcePool()) {
//未勾选资源池运行时将资源池ID赋空
runModeConfig.setResourcePoolId(null);
}
String apiRunConfig = JSON.toJSONString(runModeConfig);
return this.runTestPlan(testPlanId, testplanRunRequest.getProjectId(),
testplanRunRequest.getUserId(), testplanRunRequest.getTriggerMode(), testplanRunRequest.getReportId(), testplanRunRequest.getExecutionWay(), apiRunConfig);