diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlan.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlan.java index 9ff78811..cebcae9a 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlan.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlan.java @@ -263,7 +263,7 @@ public class TestPlan implements IAggregate { } //start monitor to check the limit UUID testPlanIdUuid = UUID.fromString(this.testPlanRunId); - if (getMonitors() != null) { + if (getMonitors() != null && this.limitModel != null) { for (Monitor monitor : getMonitors()) { monitor.start(testPlanIdUuid, this.limitModel); } diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java index 6229b84a..02773447 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java @@ -141,6 +141,7 @@ public class TestPlanEngine implements TaskCompleteCallback, + testPlanId.toString()); return; } + testPlan.addObserver(this); testPlan.run(); this.getTestPlanRepository().attachRunningTestPlan(testPlan); }