use of org.onlab.junit.NullScheduledExecutor in project onos by opennetworkinglab.
the class WorkPartitionManagerTest method setUp.
@Before
public void setUp() {
leadershipService = createMock(LeadershipService.class);
leadershipService.addListener(anyObject(LeadershipEventListener.class));
expectLastCall().andDelegateTo(new TestLeadershipService());
for (int i = 0; i < WorkPartitionManager.NUM_PARTITIONS; i++) {
expect(leadershipService.runForLeadership(ELECTION_PREFIX + i)).andReturn(null).times(1);
}
partitionManager = new WorkPartitionManager().withScheduledExecutor(new NullScheduledExecutor());
partitionManager.clusterService = new TestClusterService();
partitionManager.localNodeId = MY_NODE_ID;
partitionManager.leadershipService = leadershipService;
partitionManager.eventDispatcher = new TestEventDispatcher();
}
Aggregations