add observer to testplan when running

This commit is contained in:
hmm 2014-09-25 14:47:30 +08:00
parent 65aec6550e
commit d461e5f325
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,6 @@ public class TestPlanEngine implements TaskCompleteCallback,
throws IllegalParameterException {
TestPlan testPlan = this.getTestPlanFactory().createATestPlanWithoutId(
testPlanBusinessModel, user, testPlanRunId);
testPlan.addObserver(this);
Logger.getLogger(TestPlanService.class).info(
"test plan name:" + testPlan.getName());
return this.getTestPlanRepository().attach(testPlan);
@ -142,6 +141,7 @@ public class TestPlanEngine implements TaskCompleteCallback,
+ testPlanId.toString());
return;
}
testPlan.addObserver(this);
testPlan.run();
this.getTestPlanRepository().attachRunningTestPlan(testPlan);
}