Package org.hive2hive.core.processes.util

Examples of org.hive2hive.core.processes.util.BusySucceedingStep


    assertTrue(process.getState() == ProcessState.SUCCEEDED);
    assertTrue(step.getState() == ProcessState.SUCCEEDED);

    // 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);
  }
View Full Code Here


    TestUtil.wait(WAIT_FOR_ASYNC);
    assertTrue(asyncProcess.getState() == ProcessState.SUCCEEDED);

    // sync components
    process = new SequentialProcess();
    process.add(new BusySucceedingStep());
    asyncProcess = new AsyncComponent(process);
    asyncProcess.start();
    assertFalse(asyncProcess.getState() == ProcessState.SUCCEEDED);

    TestUtil.wait(WAIT_FOR_ASYNC);
    assertTrue(asyncProcess.getState() == ProcessState.SUCCEEDED);

    // async components
    process = new SequentialProcess();
    process.add(new AsyncComponent(new BusySucceedingStep()));
    asyncProcess = new AsyncComponent(process);
    asyncProcess.start();
    assertFalse(asyncProcess.getState() == ProcessState.SUCCEEDED);

    TestUtil.wait(WAIT_FOR_ASYNC);
View Full Code Here

    subProcess.add(subStep1);
    subProcess.add(subStep2);

    process = new SequentialProcess();
    step1 = new SucceedingProcessStep();
    step2 = new BusySucceedingStep(); // make sure rollback waits for all async components
    AsyncComponent asyncStep2 = new AsyncComponent(step2);
    step3 = new FailingProcessStep();
    step4 = new SucceedingProcessStep();
    process.add(step1);
    process.add(asyncStep2);
View Full Code Here

    subProcess.add(subStep1);
    subProcess.add(subStep2);

    process = new SequentialProcess();
    step1 = new SucceedingProcessStep();
    step2 = new BusySucceedingStep(); // make sure rollback waits for all async components
    AsyncComponent asyncStep2 = new AsyncComponent(step2);
    step3 = new FailingProcessStep();
    step4 = new SucceedingProcessStep();
    process.add(step1);
    process.add(asyncStep2);
View Full Code Here

  @Test
  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);
View Full Code Here

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

TOP

Related Classes of org.hive2hive.core.processes.util.BusySucceedingStep

Copyright © 2018 www.massapicom. 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.