use of io.pravega.controller.fault.ContainerBalancer in project pravega by pravega.
the class SegmentContainerMonitorHealthContributorTest method setup.
@Before
public void setup() {
HostControllerStore hostStore = mock(HostControllerStore.class);
CuratorFramework client = mock(CuratorFramework.class);
ContainerBalancer balancer = mock(ContainerBalancer.class);
CuratorZookeeperClient curatorZKClientMock = mock(CuratorZookeeperClient.class);
Listenable listen = mock(Listenable.class);
doNothing().when(listen).addListener(any(ConnectionStateListener.class));
doReturn(listen).when(client).getConnectionStateListenable();
doReturn(curatorZKClientMock).when(client).getZookeeperClient();
doReturn(true).when(curatorZKClientMock).isConnected();
monitor = spy(new SegmentContainerMonitor(hostStore, client, balancer, 1));
contributor = new SegmentContainerMonitorHealthContributor("segmentcontainermonitor", monitor);
builder = Health.builder().name("monitor");
}
Aggregations