Codota Logo
InMemoryPipelineExecutorRegistry.getExecutorTrace
Code IndexAdd Codota to your IDE (free)

How to use
getExecutorTrace
method
in
org.guvnor.ala.registry.inmemory.InMemoryPipelineExecutorRegistry

Best Java code snippets using org.guvnor.ala.registry.inmemory.InMemoryPipelineExecutorRegistry.getExecutorTrace (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: org.kie.workbench/kie-wb-common-ala-spi

@Test
public void getExecutorTraceByRuntimeId() {
  RuntimeIdMock runtimeId = mock(RuntimeIdMock.class);
  when(runtimeId.getId()).thenReturn(RUNTIME_ID);
  PipelineExecutorTask task = mock(PipelineExecutorTask.class);
  when(task.getOutput()).thenReturn(runtimeId);
  when(trace.getTask()).thenReturn(task);
  pipelineExecutorRegistry.register(trace);
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(runtimeId);
  assertEquals(trace,
         result);
}
origin: org.guvnor/guvnor-ala-spi

@Test
public void getExecutorTraceByRuntimeId() {
  RuntimeIdMock runtimeId = mock(RuntimeIdMock.class);
  when(runtimeId.getId()).thenReturn(RUNTIME_ID);
  PipelineExecutorTask task = mock(PipelineExecutorTask.class);
  when(task.getOutput()).thenReturn(runtimeId);
  when(trace.getTask()).thenReturn(task);
  pipelineExecutorRegistry.register(trace);
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(runtimeId);
  assertEquals(trace,
         result);
}
origin: org.kie.workbench/kie-wb-common-ala-registry-vfs

@Test
@Override
public void testDeregister() {
  prepareTargetPath();
  pipelineExecutorRegistry.register(trace);
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertEquals(trace,
         result);
  pipelineExecutorRegistry.deregister(PIPELINE_EXECUTION_ID);
  verify(registryHelper,
      times(1)).deleteBatch(traceTargetPath);
  result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertNull(result);
}
origin: org.guvnor/guvnor-ala-spi

@Test
public void testGetExecutorTrace() {
  pipelineExecutorRegistry.register(trace);
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertEquals(trace,
         result);
}
origin: org.guvnor/guvnor-ala-registry-vfs

@Test
@Override
public void testDeregister() {
  prepareTargetPath();
  pipelineExecutorRegistry.register(trace);
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertEquals(trace,
         result);
  pipelineExecutorRegistry.deregister(PIPELINE_EXECUTION_ID);
  verify(registryHelper,
      times(1)).deleteBatch(traceTargetPath);
  result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertNull(result);
}
origin: org.guvnor/guvnor-ala-spi

@Test
public void testRegister() {
  pipelineExecutorRegistry.register(trace);
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertEquals(trace,
         result);
}
origin: org.kie.workbench/kie-wb-common-ala-spi

@Test
public void testGetExecutorTrace() {
  pipelineExecutorRegistry.register(trace);
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertEquals(trace,
         result);
}
origin: org.kie.workbench/kie-wb-common-ala-spi

@Test
public void testDeregister() {
  pipelineExecutorRegistry.register(trace);
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertEquals(trace,
         result);
  pipelineExecutorRegistry.deregister(trace.getTaskId());
  result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertNull(result);
}
origin: org.guvnor/guvnor-ala-spi

@Test
public void testDeregister() {
  pipelineExecutorRegistry.register(trace);
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertEquals(trace,
         result);
  pipelineExecutorRegistry.deregister(trace.getTaskId());
  result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertNull(result);
}
origin: org.kie.workbench/kie-wb-common-ala-spi

@Test
public void testRegister() {
  pipelineExecutorRegistry.register(trace);
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertEquals(trace,
         result);
}
origin: org.kie.workbench/kie-wb-common-ala-registry-vfs

@Test
public void testInit() throws Exception {
  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);
  }
  when(registryHelper.readEntries(registryRoot,
                  VFSRegistryHelper.BySuffixFilter.newFilter(TRACE_SUFFIX))).thenReturn(traces);
  ((VFSPipelineExecutorRegistry) pipelineExecutorRegistry).init();
  verify(registryHelper,
      times(2)).ensureDirectory(PIPELINE_EXECUTOR_REGISTRY_PATH);
  verify(registryHelper,
      times(2)).readEntries(registryRoot,
                 VFSRegistryHelper.BySuffixFilter.newFilter(TRACE_SUFFIX));
  for (Object trace : traces) {
    PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(((PipelineExecutorTrace) trace).getTaskId());
    assertNotNull(result);
    assertEquals(trace,
           result);
  }
}
origin: org.guvnor/guvnor-ala-registry-vfs

@Test
public void testInit() throws Exception {
  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);
  }
  when(registryHelper.readEntries(registryRoot,
                  VFSRegistryHelper.BySuffixFilter.newFilter(TRACE_SUFFIX))).thenReturn(traces);
  ((VFSPipelineExecutorRegistry) pipelineExecutorRegistry).init();
  verify(registryHelper,
      times(2)).ensureDirectory(PIPELINE_EXECUTOR_REGISTRY_PATH);
  verify(registryHelper,
      times(2)).readEntries(registryRoot,
                 VFSRegistryHelper.BySuffixFilter.newFilter(TRACE_SUFFIX));
  for (Object trace : traces) {
    PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(((PipelineExecutorTrace) trace).getTaskId());
    assertNotNull(result);
    assertEquals(trace,
           result);
  }
}
origin: org.kie.workbench/kie-wb-common-ala-registry-vfs

@Test
@Override
public void testRegister() {
  prepareTargetPath();
  pipelineExecutorRegistry.register(trace);
  try {
    verify(registryHelper,
        times(1)).storeEntry(traceTargetPath,
                  trace);
  } catch (Exception e) {
    //need to catch this exception because parent class method don't throws exceptions,
    //but this will never happen in this scenario.
    fail(e.getMessage());
  }
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertEquals(trace,
         result);
}
origin: org.guvnor/guvnor-ala-registry-vfs

@Test
@Override
public void testRegister() {
  prepareTargetPath();
  pipelineExecutorRegistry.register(trace);
  try {
    verify(registryHelper,
        times(1)).storeEntry(traceTargetPath,
                  trace);
  } catch (Exception e) {
    //need to catch this exception because parent class method don't throws exceptions,
    //but this will never happen in this scenario.
    fail(e.getMessage());
  }
  PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
  assertEquals(trace,
         result);
}
org.guvnor.ala.registry.inmemoryInMemoryPipelineExecutorRegistrygetExecutorTrace

Popular methods of InMemoryPipelineExecutorRegistry

  • deregister
  • register
  • <init>
  • getExecutorTraces

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JComboBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now