diff --git a/backend/src/main/java/io/metersphere/api/jmeter/FixedTask.java b/backend/src/main/java/io/metersphere/api/jmeter/FixedTask.java index b1051f8fbf..67f1270d80 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/FixedTask.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/FixedTask.java @@ -10,7 +10,7 @@ import org.springframework.stereotype.Component; public class FixedTask { private ApiExecutionQueueService queueService; - @Scheduled(cron = "0 */2 * * * ?") + @Scheduled(cron = "0 0/2 * * * ?") public void execute() { if (queueService == null) { queueService = CommonBeanFactory.getBean(ApiExecutionQueueService.class); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiExecutionQueueService.java b/backend/src/main/java/io/metersphere/api/service/ApiExecutionQueueService.java index 96a08a3414..6243b7b1f0 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiExecutionQueueService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiExecutionQueueService.java @@ -237,15 +237,16 @@ public class ApiExecutionQueueService { if (report != null && StringUtils.equalsAny(report.getStatus(), TestPlanReportStatus.RUNNING.name()) && report.getUpdateTime() < now) { report.setStatus(ScenarioStatus.Timeout.name()); apiScenarioReportMapper.updateByPrimaryKeySelective(report); + executionQueueDetailMapper.deleteByPrimaryKey(item.getId()); } } else { ApiDefinitionExecResult result = apiDefinitionExecResultMapper.selectByPrimaryKey(item.getReportId()); if (result != null && StringUtils.equalsAny(result.getStatus(), TestPlanReportStatus.RUNNING.name())) { result.setStatus(ScenarioStatus.Timeout.name()); apiDefinitionExecResultMapper.updateByPrimaryKeySelective(result); + executionQueueDetailMapper.deleteByPrimaryKey(item.getId()); } } - executionQueueDetailMapper.deleteByPrimaryKey(item.getId()); }); } diff --git a/frontend/src/business/components/api/automation/scenario/DebugRun.vue b/frontend/src/business/components/api/automation/scenario/DebugRun.vue index 10a49c7736..a87b2f5e61 100644 --- a/frontend/src/business/components/api/automation/scenario/DebugRun.vue +++ b/frontend/src/business/components/api/automation/scenario/DebugRun.vue @@ -40,7 +40,7 @@ export default { sort(stepArray) { if (stepArray) { for (let i in stepArray) { - if (!stepArray[i].clazzName) { + if (stepArray[i] && TYPE_TO_C.get(stepArray[i].type) && !stepArray[i].clazzName) { stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type); } if (stepArray[i].type === "Assertions" && !stepArray[i].document) { diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 43f29001f7..6f94cabcc2 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -762,11 +762,9 @@ export default { this.messageWebSocket.onmessage = this.onDebugMessage; }, runningEditParent(node) { - if (node) { + if (node.parent && node.parent.data && node.parent.data.id) { node.data.testing = true; - if (node.parent && node.parent.data && node.parent.data.id) { - this.runningEditParent(node.parent); - } + this.runningEditParent(node.parent); } }, runningNodeChild(arr, resultData) { @@ -1466,7 +1464,7 @@ export default { formatData(hashTree) { for (let i in hashTree) { - if (!hashTree[i].clazzName) { + if (hashTree[i] && TYPE_TO_C.get(hashTree[i].type) && !hashTree[i].clazzName) { hashTree[i].clazzName = TYPE_TO_C.get(hashTree[i].type); } if (hashTree[i] && hashTree[i].authManager && !hashTree[i].authManager.clazzName) {