use of org.apache.bookkeeper.stream.proto.storage.DeleteNamespaceResponse in project bookkeeper by apache.
the class TestRootRangeStoreImpl method deleteNamespaceAndVerify.
private DeleteNamespaceResponse deleteNamespaceAndVerify(String nsName) throws Exception {
CompletableFuture<DeleteNamespaceResponse> deleteFuture = rootRangeStore.deleteNamespace(createDeleteNamespaceRequest(nsName));
DeleteNamespaceResponse deleteResp = FutureUtils.result(deleteFuture);
assertEquals(StatusCode.SUCCESS, deleteResp.getCode());
return deleteResp;
}
use of org.apache.bookkeeper.stream.proto.storage.DeleteNamespaceResponse in project bookkeeper by apache.
the class StorageContainerImplTest method testDeleteNamespace.
@Test
public void testDeleteNamespace() throws Exception {
mockStorageContainer(SCID);
DeleteNamespaceResponse expectedResp = DeleteNamespaceResponse.getDefaultInstance();
when(rrStore.deleteNamespace(any(DeleteNamespaceRequest.class))).thenReturn(FutureUtils.value(expectedResp));
DeleteNamespaceRequest expectedReq = DeleteNamespaceRequest.getDefaultInstance();
assertSame(expectedResp, FutureUtils.result(rrStore.deleteNamespace(expectedReq)));
verify(rrStore, times(1)).deleteNamespace(same(expectedReq));
}
Aggregations