fix(测试跟踪): 优化测试计划串行队列

优化测试计划串行队列
This commit is contained in:
song-tianyang 2022-12-20 10:56:46 +08:00 committed by 建国
parent c6b31d791a
commit bbe39a6f24
1 changed files with 2 additions and 4 deletions

View File

@ -503,14 +503,13 @@ public class TestPlanReportService {
} }
TestPlanReportContentWithBLOBs content = null; TestPlanReportContentWithBLOBs content = null;
try { try {
HttpHeaderUtils.runAsUser("admin"); HttpHeaderUtils.runAsUser(testPlanReport.getCreator());
testPlanReport.setStatus(status); testPlanReport.setStatus(status);
content = this.initTestPlanContent(testPlanReport, status); content = this.initTestPlanContent(testPlanReport, status);
} catch (Exception e) { } catch (Exception e) {
HttpHeaderUtils.clearUser();
testPlanReport.setStatus(status);
LogUtil.error("统计测试计划状态失败!", e); LogUtil.error("统计测试计划状态失败!", e);
} finally { } finally {
HttpHeaderUtils.clearUser();
testPlanReportMapper.updateByPrimaryKey(testPlanReport); testPlanReportMapper.updateByPrimaryKey(testPlanReport);
testPlanMessageService.checkTestPlanStatusAndSendMessage(testPlanReport, content, isSendMessage); testPlanMessageService.checkTestPlanStatusAndSendMessage(testPlanReport, content, isSendMessage);
this.executeTestPlanByQueue(testPlanReportId); this.executeTestPlanByQueue(testPlanReportId);
@ -535,7 +534,6 @@ public class TestPlanReportService {
testPlanReport.setEndTime(endTime); testPlanReport.setEndTime(endTime);
testPlanReport.setUpdateTime(endTime); testPlanReport.setUpdateTime(endTime);
} }
TestPlanReportContentExample contentExample = new TestPlanReportContentExample(); TestPlanReportContentExample contentExample = new TestPlanReportContentExample();
contentExample.createCriteria().andTestPlanReportIdEqualTo(testPlanReport.getTestPlanId()); contentExample.createCriteria().andTestPlanReportIdEqualTo(testPlanReport.getTestPlanId());
List<TestPlanReportContentWithBLOBs> contents = testPlanReportContentMapper.selectByExampleWithBLOBs(contentExample); List<TestPlanReportContentWithBLOBs> contents = testPlanReportContentMapper.selectByExampleWithBLOBs(contentExample);