refactor: 资源池执行日志打印优化
This commit is contained in:
parent
b3ac9bce44
commit
e43c11a70e
|
@ -149,23 +149,22 @@ public class JMeterService {
|
||||||
|
|
||||||
ResponseEntity<String> result = restTemplate.postForEntity(uri, request, String.class);
|
ResponseEntity<String> result = restTemplate.postForEntity(uri, request, String.class);
|
||||||
if (result == null || !StringUtils.equals("SUCCESS", result.getBody())) {
|
if (result == null || !StringUtils.equals("SUCCESS", result.getBody())) {
|
||||||
LogUtil.info(result.getBody());
|
|
||||||
RemakeReportService remakeReportService = CommonBeanFactory.getBean(RemakeReportService.class);
|
RemakeReportService remakeReportService = CommonBeanFactory.getBean(RemakeReportService.class);
|
||||||
RunRequest runRequest = new RunRequest();
|
RunRequest runRequest = new RunRequest();
|
||||||
runRequest.setTestId(request.getTestId());
|
runRequest.setTestId(request.getTestId());
|
||||||
runRequest.setRunMode(request.getRunMode());
|
runRequest.setRunMode(request.getRunMode());
|
||||||
remakeReportService.remake(request);
|
remakeReportService.remake(request);
|
||||||
|
|
||||||
LoggerUtil.error("发送请求[ " + request.getTestId() + " ] 到" + uri + " 节点执行失败");
|
LoggerUtil.error("发送请求[ " + request.getTestId() + " ] 到" + uri + " 节点执行失败");
|
||||||
|
LoggerUtil.info(result.getBody());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LogUtil.error(e);
|
|
||||||
RemakeReportService remakeReportService = CommonBeanFactory.getBean(RemakeReportService.class);
|
RemakeReportService remakeReportService = CommonBeanFactory.getBean(RemakeReportService.class);
|
||||||
RunRequest runRequest = new RunRequest();
|
RunRequest runRequest = new RunRequest();
|
||||||
runRequest.setTestId(request.getTestId());
|
runRequest.setTestId(request.getTestId());
|
||||||
runRequest.setRunMode(request.getRunMode());
|
runRequest.setRunMode(request.getRunMode());
|
||||||
remakeReportService.remake(request);
|
remakeReportService.remake(request);
|
||||||
LoggerUtil.error("发送请求[ " + request.getTestId() + " ] 执行失败:" + e.getMessage());
|
LoggerUtil.error("发送请求[ " + request.getTestId() + " ] 执行失败:" + e.getMessage());
|
||||||
|
LoggerUtil.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue