fix:jenkins选择资源池运行

This commit is contained in:
wenyann 2021-06-18 18:25:11 +08:00 committed by 刘瑞斌
parent a9e7c67970
commit 6a3fd3de77
2 changed files with 7 additions and 5 deletions

View File

@ -342,7 +342,7 @@ public class TestPlanReportService {
if (testPlanReport.getIsApiCaseExecuting() || testPlanReport.getIsPerformanceExecuting() || testPlanReport.getIsScenarioExecuting()) { if (testPlanReport.getIsApiCaseExecuting() || testPlanReport.getIsPerformanceExecuting() || testPlanReport.getIsScenarioExecuting()) {
status = TestPlanReportStatus.RUNNING.name(); status = TestPlanReportStatus.RUNNING.name();
} else { } else {
if (testPlanReportData == null) { if (testPlanReportData != null) {
String failCaseString = testPlanReportData.getFailurTestCases(); String failCaseString = testPlanReportData.getFailurTestCases();
status = TestPlanReportStatus.SUCCESS.name(); status = TestPlanReportStatus.SUCCESS.name();
try { try {

View File

@ -1053,6 +1053,7 @@ public class TestPlanService {
//执行性能测试任务 //执行性能测试任务
List<String> performaneReportIDList = new ArrayList<>(); List<String> performaneReportIDList = new ArrayList<>();
List<String> performanceRunCaseIdList = new ArrayList<>();
for (Map.Entry<String, String> entry : performanceIdMap.entrySet()) { for (Map.Entry<String, String> entry : performanceIdMap.entrySet()) {
String id = entry.getKey(); String id = entry.getKey();
String caseID = entry.getValue(); String caseID = entry.getValue();
@ -1084,13 +1085,14 @@ public class TestPlanService {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
if (StringUtils.isEmpty(reportId)) { if (StringUtils.isNotEmpty(reportId)) {
performaceIsExcuting = false; performanceRunCaseIdList.add(caseID);
} }
} }
if (performaceIsExcuting) { if (!performanceRunCaseIdList.isEmpty()) {
performanceCaseIdArray = JSONArray.toJSONString(new ArrayList<>(performanceIdMap.values())); performaceIsExcuting = true;
performanceCaseIdArray = JSONArray.toJSONString(new ArrayList<>(performanceRunCaseIdList));
} }
if (!performaneReportIDList.isEmpty()) { if (!performaneReportIDList.isEmpty()) {