mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-03 04:28:51 +08:00
fix(接口测试): 兼容历史数据
This commit is contained in:
parent
7bbb4115c3
commit
636c8311dc
@ -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);
|
||||
|
@ -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());
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user