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