fix(性能测试): 避免出现 get report result error.

This commit is contained in:
Captain.B 2021-05-22 20:21:47 +08:00 committed by 刘瑞斌
parent da6bb6d0bb
commit de17d9b09c
1 changed files with 2 additions and 1 deletions

View File

@ -145,7 +145,8 @@ public class PerformanceReportService {
example.createCriteria().andReportIdEqualTo(id).andReportKeyEqualTo(reportKey.name());
List<LoadTestReportResult> loadTestReportResults = loadTestReportResultMapper.selectByExampleWithBLOBs(example);
if (loadTestReportResults.size() == 0) {
MSException.throwException("get report result error.");
LogUtil.warn("get report result error");
return "";
}
return loadTestReportResults.get(0).getReportValue();
}