Package org.hive2hive.core.processes.framework.concretes

Examples of org.hive2hive.core.processes.framework.concretes.SequentialProcess.start()


    step3 = new SucceedingProcessStep();
    process.add(step1);
    process.add(step2);
    process.add(subProcess);
    process.add(step3);
    process.start();

    assertTrue(process.getState() == ProcessState.FAILED);
    assertTrue(step1.getState() == ProcessState.FAILED);
    assertTrue(step2.getState() == ProcessState.FAILED);
    assertTrue(subProcess.getState() == ProcessState.FAILED);
View Full Code Here


    process.add(step1);
    process.add(asyncStep2);
    process.add(subProcess);
    process.add(step3);
    process.add(step4);
    process.start();

    assertTrue(process.getState() == ProcessState.FAILED);
    assertTrue(step1.getState() == ProcessState.FAILED);
    assertTrue(asyncStep2.getState() == ProcessState.FAILED);
    assertTrue(step2.getState() == ProcessState.FAILED);
View Full Code Here

    process.add(step1);
    process.add(step2);
    process.add(subProcess);
    process.add(asyncStep3);
    process.add(step4);
    process.start();

    assertTrue(process.getState() == ProcessState.FAILED);
    assertTrue(step1.getState() == ProcessState.FAILED);
    assertTrue(step2.getState() == ProcessState.FAILED);
    assertTrue(subProcess.getState() == ProcessState.FAILED);
View Full Code Here

    step3 = new SucceedingProcessStep();
    process.add(step1);
    process.add(step2);
    process.add(asyncSubProcess);
    process.add(step3);
    process.start();

    assertTrue(process.getState() == ProcessState.FAILED);
    assertTrue(step1.getState() == ProcessState.FAILED);
    assertTrue(step2.getState() == ProcessState.FAILED);
    assertTrue(asyncSubProcess.getState() == ProcessState.FAILED);
View Full Code Here

  public void awaitSyncTest() throws InvalidProcessStateException, InterruptedException {
   
    // succeeding process
    SequentialProcess process = new SequentialProcess();
    process.add(new BusySucceedingStep());
    process.start();
    process.await();
    if (process.getState() != ProcessState.SUCCEEDED)
      fail("Busy process should have finished. Await() did not block.");
    TestUtil.wait(TestUtil.DEFAULT_WAITING_TIME);
    assertTrue(process.getState() == ProcessState.SUCCEEDED);
View Full Code Here

    assertTrue(process.getState() == ProcessState.SUCCEEDED);
   
    // failing process
    SequentialProcess process2 = new SequentialProcess();
    process2.add(new BusyFailingStep());
    process2.start();
    process2.await();
    if (process2.getState() != ProcessState.FAILED)
      fail("Busy process should have finished. Await() did not block.");
    TestUtil.wait(TestUtil.DEFAULT_WAITING_TIME);
    assertTrue(process2.getState() == ProcessState.FAILED);
View Full Code Here

  @Test
  public void syncSuccessTest() throws InvalidProcessStateException {

    // empty
    SequentialProcess process = new SequentialProcess();
    process.start();
    assertTrue(process.getState() == ProcessState.SUCCEEDED);

    // sync components
    process = new SequentialProcess();
    ProcessStep step = new SucceedingProcessStep();
View Full Code Here

    // sync components
    process = new SequentialProcess();
    ProcessStep step = new SucceedingProcessStep();
    process.add(step);
    process.start();
    assertTrue(process.getState() == ProcessState.SUCCEEDED);
    assertTrue(step.getState() == ProcessState.SUCCEEDED);

    // async components
    process = new SequentialProcess();
View Full Code Here

    // async components
    process = new SequentialProcess();
    ProcessComponent asyncStep = new AsyncComponent(new BusySucceedingStep());
    process.add(asyncStep);
    process.start();
    assertTrue(process.getState() == ProcessState.SUCCEEDED);
    assertTrue(asyncStep.getState() == ProcessState.SUCCEEDED);
  }

  @Test
View Full Code Here

  @Test
  public void syncFailTest() throws InvalidProcessStateException {

    // empty
    SequentialProcess process = new FailingSequentialProcess();
    process.start();
    assertTrue(process.getState() == ProcessState.FAILED);

    // sync components
    process = new SequentialProcess();
    ProcessStep step = new FailingProcessStep();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.