use of com.twitter.heron.spi.uploader.UploaderException in project incubator-heron by apache.
the class SubmitterMainTest method testSubmitTopologyUploaderException.
@Test(expected = UploaderException.class)
public void testSubmitTopologyUploaderException() throws Exception {
SubmitterMain submitterMain = spy(new SubmitterMain(config, topology));
doNothing().when(submitterMain).validateSubmit(any(SchedulerStateManagerAdaptor.class), anyString());
doThrow(new UploaderException("")).when(submitterMain).uploadPackage(eq(uploader));
try {
submitterMain.submitTopology();
} finally {
verify(uploader, never()).undo();
verify(uploader).close();
verify(launcher).close();
verify(statemgr).close();
}
}
Aggregations