fix(测试计划) 修复测试用例执行问题 #1155049933001006736

--bug=1006736 --user=赵勇 【测试计划】测试计划中批量执行接口测试用例未执行 https://www.tapd.cn/55049933/s/1048987
This commit is contained in:
fit2-zhao 2021-09-22 11:54:51 +08:00 committed by fit2-zhao
parent 6c7b1f7cca
commit 116af643ec
4 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ public class SerialScenarioExecTask<T> implements Callable<T> {
@Override
public T call() {
try {
if (MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) {
if (runModeDataDTO.getReport()!=null && MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) {
MessageCache.terminationOrderDeque.remove(runModeDataDTO.getReport().getId());
return null;
}
@ -52,7 +52,7 @@ public class SerialScenarioExecTask<T> implements Callable<T> {
if (report != null && !report.getStatus().equals(APITestStatus.Running.name())) {
break;
}
if (MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) {
if (runModeDataDTO.getReport()!=null && MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) {
MessageCache.terminationOrderDeque.remove(runModeDataDTO.getReport().getId());
break;
}

View File

@ -421,7 +421,7 @@ public class TestPlanApiCaseService {
public void run() {
for (TestPlanApiCase testPlanApiCase : executeQueue.keySet()) {
try {
if (MessageCache.terminationOrderDeque.contains(executeQueue.get(testPlanApiCase).getId())) {
if (executeQueue.get(testPlanApiCase)!=null && MessageCache.terminationOrderDeque.contains(executeQueue.get(testPlanApiCase).getId())) {
MessageCache.terminationOrderDeque.remove(executeQueue.get(testPlanApiCase).getId());
break;
}

View File

@ -34,7 +34,7 @@ public class SerialApiExecTask<T> implements Callable<T> {
@Override
public T call() {
try {
if (MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) {
if (runModeDataDTO.getReport()!=null && MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) {
MessageCache.terminationOrderDeque.remove(runModeDataDTO.getReport().getId());
return null;
}
@ -53,7 +53,7 @@ public class SerialApiExecTask<T> implements Callable<T> {
if (report != null && !report.getStatus().equals(APITestStatus.Running.name())) {
break;
}
if (MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) {
if (runModeDataDTO.getReport()!=null && MessageCache.terminationOrderDeque.contains(runModeDataDTO.getReport().getId())) {
MessageCache.terminationOrderDeque.remove(runModeDataDTO.getReport().getId());
break;
}

View File

@ -237,7 +237,7 @@ export default {
let taskTotal = e.data;
this.runningTotal = taskTotal;
this.initIndex++;
if (this.taskVisible && taskTotal > 0 && this.initEnd) {
if (this.taskVisible && this.initEnd) {
setTimeout(() => {
this.initEnd = false;
this.init();