@Test public void testGetExecutorTraces() { List<PipelineExecutorTrace> traces = new ArrayList<>(); for (int i = 0; i < TRACES_COUNT; i++) { PipelineExecutorTrace trace = mock(PipelineExecutorTrace.class); when(trace.getTaskId()).thenReturn(PIPELINE_EXECUTION_ID + Integer.toString(i)); traces.add(trace); } traces.forEach(trace -> pipelineExecutorRegistry.register(trace)); Collection<PipelineExecutorTrace> result = pipelineExecutorRegistry.getExecutorTraces(); assertEquals(traces.size(), result.size()); for (PipelineExecutorTrace trace : traces) { assertTrue(result.contains(trace)); } }
@Override public Collection<PipelineExecutorTrace> getExecutorTraces() { return recordsMap.values(); }
InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public Collection<PipelineExecutorTrace> getExecutorTraces() { return recordsMap.values(); } }
InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public Collection<PipelineExecutorTrace> getExecutorTraces() { return recordsMap.values(); } InMemoryPipelineExecutorRegistry(); }
InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public Collection<PipelineExecutorTrace> getExecutorTraces() { return recordsMap.values(); } InMemoryPipelineExecutorRegistry(); @Override void register(final PipelineExecutorTrace trace); void deregister(final String pipelineExecutionId); @Override PipelineExecutorTrace getExecutorTrace(final String pipelineExecutionId); @Override Collection<PipelineExecutorTrace> getExecutorTraces(); @Override PipelineExecutorTrace getExecutorTrace(final RuntimeId runtimeId); }
InMemoryPipelineExecutorRegistry implements PipelineExecutorRegistry { @Override public Collection<PipelineExecutorTrace> getExecutorTraces() { return recordsMap.values(); } InMemoryPipelineExecutorRegistry(); @Override void register(final PipelineExecutorTrace trace); void deregister(final String pipelineExecutionId); @Override PipelineExecutorTrace getExecutorTrace(final String pipelineExecutionId); @Override Collection<PipelineExecutorTrace> getExecutorTraces(); @Override PipelineExecutorTrace getExecutorTrace(final RuntimeId runtimeId);  }