fix(测试跟踪): 测试计划定时任务执行获取登录用户报错日志

This commit is contained in:
song-cc-rock 2023-05-05 13:50:18 +08:00 committed by 刘瑞斌
parent 27b173791a
commit 00f3c2bcaa
2 changed files with 1 additions and 5 deletions

View File

@ -38,7 +38,7 @@ public class SessionUtils {
assert user != null;
return user;
} catch (Exception e) {
LogUtil.error(e.getMessage(), e);
LogUtil.warn("后台获取在线用户失败: " + e.getMessage());
return null;
}
}

View File

@ -26,8 +26,6 @@ public class TestPlanTestJob extends MsScheduleJob {
private BaseUserService baseUserService;
private static DefaultSecurityManager defaultSecurityManager = new DefaultSecurityManager();
public TestPlanTestJob() {
this.testPlanService = CommonBeanFactory.getBean(TestPlanService.class);
this.baseUserService = CommonBeanFactory.getBean(BaseUserService.class);
@ -49,8 +47,6 @@ public class TestPlanTestJob extends MsScheduleJob {
this.expression = jobDataMap.getString("expression");
this.projectID = jobDataMap.getString("projectId");
// 业务中涉及远程调用, 需在定时任务中获取subject.
ThreadContext.bind(defaultSecurityManager);
businessExecute(context);
}