add testStatus to monitor doAfterRun

This commit is contained in:
fanfuxiaoran 2014-03-31 15:59:10 +08:00
parent a368444412
commit 2866bd973e
4 changed files with 6 additions and 4 deletions

View File

@ -90,7 +90,9 @@ public class Monitor extends Observable {
}
public void doAfterRun() {
public void doAfterRun(Boolean testPlanFinished) {
if (testPlanFinished)
return;
try {
MonitorMain monitorResult = getTestMonitorSampler()
.getMonitorResult(hostName, port);

View File

@ -195,7 +195,7 @@ public class TestPlan implements IAggregate {
}
if (getMonitors() != null) {
for (Monitor monitor : getMonitors()) {
monitor.doAfterRun();
monitor.doAfterRun(isFinish());
}
}

View File

@ -27,7 +27,7 @@ public class Test_Monitor extends TestBase_MakeUpTestPlan {
getTestPlanRunIdUuid());
assertEquals(1, testPlan.getMonitors().size());
for (Monitor monitor : testPlan.getMonitors()) {
monitor.doAfterRun();
monitor.doAfterRun(testPlan.isFinish());
}
}

View File

@ -28,7 +28,7 @@ public class Test_Monitor extends TestBase_MakeUpTestPlan {
getTestPlanRunIdUuid());
assertEquals(1, testPlan.getMonitors().size());
for (Monitor monitor : testPlan.getMonitors()) {
monitor.doAfterRun();
monitor.doAfterRun(false);
}
for (Monitor monitor : getTestPlanRepository().getTestPlanBy(
getTestPlanRunIdUuid()).getMonitors()) {