diff --git a/backend/src/main/java/io/metersphere/api/exec/ApiPoolDebugService.java b/backend/src/main/java/io/metersphere/api/exec/ApiPoolDebugService.java index 9ee32f0ab7..4d3b3386ae 100644 --- a/backend/src/main/java/io/metersphere/api/exec/ApiPoolDebugService.java +++ b/backend/src/main/java/io/metersphere/api/exec/ApiPoolDebugService.java @@ -94,9 +94,13 @@ public class ApiPoolDebugService { List poolList = systemParameterService.getTestResourcePool(); QuotaService baseQuotaService = CommonBeanFactory.getBean(QuotaService.class); - Set poolSets = baseQuotaService.getQuotaResourcePools(); + Set poolSets = null; + if (baseQuotaService != null) { + poolSets = baseQuotaService.getQuotaResourcePools(); + } if (CollectionUtils.isNotEmpty(poolSets)) { - poolList = poolList.stream().filter(pool -> poolSets.contains(pool.getId())).collect(Collectors.toList()); + Set finalPoolSets = poolSets; + poolList = poolList.stream().filter(pool -> finalPoolSets.contains(pool.getId())).collect(Collectors.toList()); } if (CollectionUtils.isEmpty(poolList)) {