use of org.apache.distributedlog.api.namespace.Namespace in project heron by twitter.
the class DlogUploaderTest method testUndoFailure.
@Test
public void testUndoFailure() throws Exception {
Namespace ns = mock(Namespace.class);
when(nsBuilder.build()).thenReturn(ns);
Mockito.doThrow(new IOException("test")).when(ns).deleteLog(anyString());
uploader.initialize(config);
assertFalse(uploader.undo());
verify(ns, times(1)).deleteLog(eq(uploader.getPackageName()));
}
Aggregations