@Test public void testRegisterWhenMarshallingErrors() throws Exception { prepareTargetPath(); expectedException.expectMessage("Unexpected error was produced during trace marshalling/storing, trace: " + trace); doThrow(new Exception("no matter the message here")) .when(registryHelper) .storeEntry(traceTargetPath, trace); pipelineExecutorRegistry.register(trace); }
@Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e); throw new RuntimeException("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e); } super.register(trace); }
VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e); throw new RuntimeException("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e); } super.register(trace); } }
VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e); throw new RuntimeException("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e); } super.register(trace); } VFSPipelineExecutorRegistry(); @Inject  VFSPipelineExecutorRegistry(final VFSRegistryHelper registryHelper); }
VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e); throw new RuntimeException("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e); } super.register(trace); } VFSPipelineExecutorRegistry(); @Inject  VFSPipelineExecutorRegistry(final VFSRegistryHelper registryHelper); @PostConstruct void init(); @Override void register(final PipelineExecutorTrace trace); @Override void deregister(final String taskId); }
VFSPipelineExecutorRegistry extends InMemoryPipelineExecutorRegistry { @Override public void register(final PipelineExecutorTrace trace) { checkNotNull("trace", trace); final Path path = buildTracePath(trace.getTaskId()); try { registryHelper.storeEntry(path, trace); } catch (Exception e) { logger.error("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e); throw new RuntimeException("Unexpected error was produced during trace marshalling/storing, trace: " + trace, e); } super.register(trace); } VFSPipelineExecutorRegistry(); @Inject  VFSPipelineExecutorRegistry(final VFSRegistryHelper registryHelper); @PostConstruct void init(); @Override void register(final PipelineExecutorTrace trace); @Override void deregister(final String taskId);  }