Examples of tickASecond()


Examples of org.hive2hive.core.H2HWaiter.tickASecond()

    registerProcess.attachListener(listener);
    registerProcess.start();

    H2HWaiter waiter = new H2HWaiter(20);
    do {
      waiter.tickASecond();
    } while (!listener.hasFailed());
  }
}
View Full Code Here

Examples of org.hive2hive.core.H2HWaiter.tickASecond()

        new HashSet<String>(0), notifier);
    process.start();

    H2HWaiter waiter = new H2HWaiter(20);
    do {
      waiter.tickASecond();
    } while (!msgFactory.allMsgsArrived());

    Assert.assertEquals(ProcessState.SUCCEEDED, process.getState());
  }
View Full Code Here

Examples of org.hive2hive.core.H2HWaiter.tickASecond()

        notifier);
    process.start();

    H2HWaiter waiter = new H2HWaiter(20);
    do {
      waiter.tickASecond();
    } while (!msgFactory.allMsgsArrived());

    Assert.assertEquals(ProcessState.SUCCEEDED, process.getState());
  }
View Full Code Here

Examples of org.hive2hive.core.H2HWaiter.tickASecond()

        notifier);
    process.start();

    H2HWaiter waiter = new H2HWaiter(20);
    do {
      waiter.tickASecond();
    } while (!msgFactory.allMsgsArrived());

    Assert.assertEquals(4, msgFactory.getSentMessageCount());
    Assert.assertEquals(ProcessState.SUCCEEDED, process.getState());
  }
View Full Code Here

Examples of org.hive2hive.core.H2HWaiter.tickASecond()

    // wait until all messages are sent
    UseCaseTestUtil.waitTillSucceded(listener, 20);

    H2HWaiter waiter = new H2HWaiter(10);
    do {
      waiter.tickASecond();
      // wait until all messages are here except 1
    } while (msgFactory.getArrivedMessageCount() != 3);
  }

  /**
 
View Full Code Here

Examples of org.hive2hive.core.H2HWaiter.tickASecond()

    // wait until all messages are sent
    UseCaseTestUtil.waitTillSucceded(listener, 20);

    H2HWaiter waiter = new H2HWaiter(10);
    do {
      waiter.tickASecond();
      // wait until all messages are here except 1
    } while (msgFactory.getArrivedMessageCount() != 2);
  }

  /**
 
View Full Code Here

Examples of org.hive2hive.core.H2HWaiter.tickASecond()

    p3.bootstrap().setPeerAddress(p1.getPeerAddress()).start().awaitUninterruptibly();

    H2HWaiter w = new H2HWaiter(10);
    Data tmp = null;
    do {
      w.tickASecond();
      tmp = p3.getPeerBean()
          .storage()
          .get(new Number640(Number160.createHash("key"), Number160.ZERO, Number160.ZERO,
              Number160.ZERO));
    } while (tmp == null);
View Full Code Here

Examples of org.hive2hive.core.H2HWaiter.tickASecond()

  public static void waitTillSucceded(TestProcessComponentListener listener, int maxSeconds) {
    H2HWaiter waiter = new H2HWaiter(maxSeconds);
    do {
      if (listener.hasFailed())
        Assert.fail();
      waiter.tickASecond();
    } while (!listener.hasSucceeded());
  }

  public static void waitTillFailed(TestProcessComponentListener listener, int maxSeconds) {
    H2HWaiter waiter = new H2HWaiter(maxSeconds);
View Full Code Here

Examples of org.hive2hive.core.H2HWaiter.tickASecond()

  public static void waitTillFailed(TestProcessComponentListener listener, int maxSeconds) {
    H2HWaiter waiter = new H2HWaiter(maxSeconds);
    do {
      if (listener.hasSucceeded())
        Assert.fail();
      waiter.tickASecond();
    } while (!listener.hasFailed());
  }

  /**
   * Executes a process and waits until it's done. This is a simple helper method to reduce code
View Full Code Here

Examples of org.hive2hive.core.H2HWaiter.tickASecond()

    fileListProcess.attachListener(listener);
    fileListProcess.start();

    H2HWaiter waiter = new H2HWaiter(MAX_PROCESS_WAIT_TIME);
    do {
      waiter.tickASecond();
    } while (!listener.hasResultArrived());

    return listener.getResult();
  }
}
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.