fix: 接口执行空指针异常
This commit is contained in:
parent
ed00bfe960
commit
ff1ac93fa3
|
@ -82,8 +82,8 @@ public class APIBackendListenerHandler {
|
|||
testResult.setConsole(resultService.getJmeterLogger(testId, true));
|
||||
testResultService.saveResult(testResult, this.runMode, this.debugReportId, this.testId);
|
||||
// 清除已经中断的过程数据
|
||||
if (!MessageCache.reportCache.containsKey(testId) && resultService.processCache.containsKey(testId)) {
|
||||
resultService.processCache.remove(testId);
|
||||
if (!MessageCache.reportCache.containsKey(testId) && resultService.getProcessCache().containsKey(testId)) {
|
||||
resultService.getProcessCache().remove(testId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,11 @@ import java.util.stream.Collectors;
|
|||
public class MsResultService {
|
||||
// 零时存放实时结果
|
||||
private Cache cache = Cache.newHardMemoryCache(0, 3600 * 2);
|
||||
public ConcurrentHashMap<String, List<SampleResult>> processCache = new ConcurrentHashMap<>();
|
||||
private ConcurrentHashMap<String, List<SampleResult>> processCache = new ConcurrentHashMap<>();
|
||||
|
||||
public ConcurrentHashMap<String, List<SampleResult>> getProcessCache() {
|
||||
return processCache;
|
||||
}
|
||||
|
||||
private final static String THREAD_SPLIT = " ";
|
||||
|
||||
|
|
Loading…
Reference in New Issue