use of org.apache.bookkeeper.clients.impl.internal.api.LocationClient in project bookkeeper by apache.
the class TestStorageServerClientManagerImpl method testGetLocationClient.
@SuppressWarnings("unchecked")
@Test
public void testGetLocationClient() throws Exception {
LocationClient lc = serverManager.getLocationClient();
assertNotNull(lc);
assertEquals(lc, serverManager.getLocationClient());
List<OneStorageContainerEndpointResponse> responses = FutureUtils.result(lc.locateStorageContainers(Lists.newArrayList(Revisioned.of(123L, 456L))));
assertEquals(1, responses.size());
assertEquals(StatusCode.SUCCESS, responses.get(0).getStatusCode());
assertEquals(ENDPOINT, responses.get(0).getEndpoint().getRwEndpoint());
assertEquals(0, responses.get(0).getEndpoint().getRoEndpointCount());
}
Aggregations