fix(测试计划执行报告缓存错误): 测试计划执行报告缓存错误

测试计划执行报告缓存错误
This commit is contained in:
song-tianyang 2021-11-05 16:00:05 +08:00 committed by song-tianyang
parent 36dc9cf429
commit fa74704d23
4 changed files with 4 additions and 3 deletions

View File

@ -73,6 +73,7 @@ public class TestPlanReportExecuteCatch {
public static synchronized void remove(String reportId){
if(testPlanReportMap.containsKey(reportId)){
testPlanReportMap.get(reportId).finishAllTask();
testPlanReportMap.remove(reportId);
}
}

View File

@ -1170,7 +1170,7 @@ public class ApiAutomationService {
if(report != null && StringUtils.isNotEmpty(request.getTestPlanReportId())){
Map<String,String> scenarioReportIdMap = new HashMap<>();
scenarioReportIdMap.put(item.getId(),report.getId());
TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(reportId, null, scenarioReportIdMap, null);
TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(request.getTestPlanReportId(), null, scenarioReportIdMap, null);
}
} else {
report = createScenarioReport(reportId, ExecuteType.Marge.name().equals(request.getExecuteType()) ? serialReportId : item.getId(), item.getName(), request.getTriggerMode(),

View File

@ -325,7 +325,7 @@ public class ApiDefinitionExecResultService {
}
testPlanLog.info("TestPlanReportId[" + testPlanReportId + "] APICASE OVER. API CASE STATUS:" + JSONObject.toJSONString(apiIdResultMap));
TestPlanReportExecuteCatch.updateApiTestPlanExecuteInfo(testPlanReportId, apiIdResultMap, null, null);
TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(testPlanReportId, caseReportMap, null, null);
// TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(testPlanReportId, caseReportMap, null, null);
}
public void deleteByResourceId(String resourceId) {

View File

@ -1188,7 +1188,7 @@ public class TestPlanService {
TestPlanReportExecuteCatch.updateApiTestPlanExecuteInfo(planReportId, executeErrorMap, null, null);
}
if (!executeReportIdMap.isEmpty()) {
TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(planReportId, null, executeReportIdMap, null);
TestPlanReportExecuteCatch.updateTestPlanExecuteResultInfo(planReportId, executeReportIdMap,null, null);
}
});
}