fix(性能测试): 修复下载正在执行的测试报告错误提示 --bug=1005192 --user=刘瑞斌 【性能测试-报告】下载... https://www.tapd.cn/55049933/s/1025731

This commit is contained in:
Captain.B 2021-07-19 10:14:08 +08:00 committed by 刘瑞斌
parent 4826d98152
commit 07d5aecdfe
1 changed files with 1 additions and 1 deletions

View File

@ -329,7 +329,7 @@ public class PerformanceReportService {
public void downloadJtlZip(String reportId, HttpServletResponse response) { public void downloadJtlZip(String reportId, HttpServletResponse response) {
LoadTestReportWithBLOBs report = getReport(reportId); LoadTestReportWithBLOBs report = getReport(reportId);
if (StringUtils.isBlank(report.getFileId())) { if (StringUtils.isBlank(report.getFileId())) {
throw new RuntimeException(Translator.get("load_test_report_file_not_exist")); MSException.throwException(Translator.get("load_test_report_file_not_exist"));
} }
response.setHeader("Content-Disposition", "attachment;fileName=" + reportId + ".zip"); response.setHeader("Content-Disposition", "attachment;fileName=" + reportId + ".zip");
try (SqlSession sqlSession = sqlSessionFactory.openSession()) { try (SqlSession sqlSession = sqlSessionFactory.openSession()) {