sh.executeLine("waitForNodesActive 0 foo");
n.getLivenessManager().heartbeatChecks();
NodeStatus status = flumeMaster.getStatMan().getNodeStatuses()
.get(nodename);
NodeState active = NodeState.ACTIVE;
assertEquals(status.state, active);
sh.executeLine("waitForNodesDone 0 foo");
n.getLivenessManager().heartbeatChecks();
status = flumeMaster.getStatMan().getNodeStatuses().get(nodename);
NodeState idle = NodeState.IDLE;
assertEquals(status.state, idle);
AccumulatorSink cnt = (AccumulatorSink) ReportManager.get().getReportable(
"count");
assertEquals(100, cnt.getCount());
n.stop();