Package org.hive2hive.core.processes.util

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


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

    // async components
    process = new SequentialProcess();
    ProcessComponent asyncStep = new AsyncComponent(new BusyFailingStep());
    process.add(asyncStep);
    process.start();
    assertTrue(process.getState() == ProcessState.FAILED);
    assertTrue(asyncStep.getState() == ProcessState.FAILED);
  }
View Full Code Here


    assertTrue(asyncProcess.getState() == ProcessState.FAILED);
    assertTrue(process.getState() == ProcessState.FAILED);

    // sync components
    process = new SequentialProcess();
    process.add(new BusyFailingStep());
    asyncProcess = new AsyncComponent(process);
    asyncProcess.start();

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

    // async components
    process = new SequentialProcess();
    process.add(new AsyncComponent(new BusyFailingStep()));
    asyncProcess = new AsyncComponent(process);
    asyncProcess.start();

    TestUtil.wait(WAIT_FOR_ASYNC);
    assertTrue(asyncProcess.getState() == ProcessState.FAILED);
View Full Code Here

    subProcess.add(subStep2);

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

    subProcess.add(subStep2);

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

    TestUtil.wait(TestUtil.DEFAULT_WAITING_TIME);
    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);
View Full Code Here

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

TOP

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

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.