parent
a46696fd6a
commit
4dcdbce306
|
@ -243,10 +243,12 @@ public class TestPlanExecuteInfo {
|
|||
public Map<String, String> getRunningApiCaseReportMap() {
|
||||
//key: reportId, value: testPlanApiCaseId
|
||||
Map<String, String> returnMap = new HashMap<>();
|
||||
for (String result : apiCaseExecInfo.keySet()) {
|
||||
if (StringUtils.equalsIgnoreCase(result, TestPlanApiExecuteStatus.RUNNING.name())) {
|
||||
if (apiCaseExecuteThreadMap.containsKey(result)) {
|
||||
returnMap.put(apiCaseExecuteThreadMap.get(result), result);
|
||||
for (Map.Entry<String,String> entry : apiCaseExecInfo.entrySet()) {
|
||||
String planCaseId = entry.getKey();
|
||||
String status = entry.getValue();
|
||||
if (StringUtils.equalsIgnoreCase(status, TestPlanApiExecuteStatus.RUNNING.name())) {
|
||||
if (apiCaseExecuteThreadMap.containsKey(planCaseId)) {
|
||||
returnMap.put(apiCaseExecuteThreadMap.get(planCaseId), planCaseId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -256,10 +258,12 @@ public class TestPlanExecuteInfo {
|
|||
public Map<String, String> getRunningScenarioReportMap() {
|
||||
//key: reportId, value: testPlanApiScenarioId
|
||||
Map<String, String> returnMap = new HashMap<>();
|
||||
for (String result : apiScenarioCaseExecInfo.keySet()) {
|
||||
if (StringUtils.equalsIgnoreCase(result, TestPlanApiExecuteStatus.RUNNING.name())) {
|
||||
if (apiScenarioThreadMap.containsKey(result)) {
|
||||
returnMap.put(apiScenarioThreadMap.get(result), result);
|
||||
for (Map.Entry<String,String> entry : apiScenarioCaseExecInfo.entrySet()) {
|
||||
String planScenarioId = entry.getKey();
|
||||
String status = entry.getValue();
|
||||
if (StringUtils.equalsIgnoreCase(status, TestPlanApiExecuteStatus.RUNNING.name())) {
|
||||
if (apiScenarioThreadMap.containsKey(planScenarioId)) {
|
||||
returnMap.put(apiScenarioThreadMap.get(planScenarioId), planScenarioId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1312,7 +1312,10 @@ public class TestPlanReportService {
|
|||
}
|
||||
}
|
||||
}
|
||||
testPlanLog.info("ReportID:"+planReportId+" 本次数据库同步,案例ID:"+JSON.toJSONString(apiCaseReportMap.keySet())+";场景ID:"+JSON.toJSONString(scenarioReportMap.keySet())+"; 同步结果,案例:"+JSON.toJSONString(updateCaseStatusMap)+";场景:"+JSON.toJSONString(updateScenarioStatusMap));
|
||||
TestPlanReportExecuteCatch.updateApiTestPlanExecuteInfo(planReportId, updateCaseStatusMap, updateScenarioStatusMap, null);
|
||||
}else {
|
||||
testPlanLog.info("同步数据库查询执行信息失败! 报告ID在缓存中未找到!"+planReportId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue