Package org.hive2hive.core

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


    process.attachListener(listener);
    process.start();

    H2HWaiter waiter = new H2HWaiter(60);
    do {
      waiter.tickASecond();
    } while (!listener.hasFailed());

    // verify if the md5 hash did not change
    UserProfile userProfile = UseCaseTestUtil.getUserProfile(downloader, userCredentials);
    FileIndex fileNode = (FileIndex) userProfile.getFileByPath(file, uploaderRoot);
View Full Code Here


    UseCaseTestUtil.executeProcess(step);

    // wait till message gets handled
    H2HWaiter w = new H2HWaiter(10);
    do {
      w.tickASecond();
      futureGet = nodeA.getDataManager().getUnblocked(parameters);
      futureGet.awaitUninterruptibly();
    } while (futureGet.getData() == null);

    // verify that data arrived
View Full Code Here

    UseCaseTestUtil.executeProcess(step);

    // wait till response message gets handled
    H2HWaiter waiter = new H2HWaiter(10);
    do {
      waiter.tickASecond();
      futureGet = nodeA.getDataManager().getUnblocked(parametersA);
      futureGet.awaitUninterruptibly();
    } while (futureGet.getData() == null);

    // load and verify if same secret was shared
View Full Code Here

    UseCaseTestUtil.executeProcess(step);

    // wait till message gets handled
    H2HWaiter w = new H2HWaiter(10);
    do {
      w.tickASecond();
      futureGet = nodeB.getDataManager().getUnblocked(parameters);
      futureGet.awaitUninterruptibly();
    } while (futureGet.getData() == null);

    // verify that data arrived
View Full Code Here

    UseCaseTestUtil.executeProcess(step);

    // wait till response message gets handled
    H2HWaiter waiter = new H2HWaiter(10);
    do {
      waiter.tickASecond();
      futureGet = nodeA.getDataManager().getUnblocked(parametersA);
      futureGet.awaitUninterruptibly();
    } while (futureGet.getData() == null);

    // load and verify if same secret was shared
View Full Code Here

   *            the file to synchronize
   */
  private static void waitTillSynchronized(File synchronizingFile) {
    H2HWaiter waiter = new H2HWaiter(40);
    do {
      waiter.tickASecond();
    } while (!synchronizingFile.exists());
  }

  private static void compareFiles(File originalFile, File synchronizedFile) throws IOException {
    Assert.assertEquals(originalFile.getName(), synchronizedFile.getName());
View Full Code Here

   *            the file to synchronize
   */
  private static void waitTillSynchronized(File synchronizingFile) {
    H2HWaiter waiter = new H2HWaiter(40);
    do {
      waiter.tickASecond();
    } while (!synchronizingFile.exists());
  }

  private static void compareFiles(File originalFile, File synchronizedFile) throws IOException {
    Assert.assertEquals(originalFile.getName(), synchronizedFile.getName());
View Full Code Here

  private static void waitTillSynchronized(File synchronizingFile, boolean appearing) {
    H2HWaiter waiter = new H2HWaiter(40);
    if (appearing) {
      do {
        waiter.tickASecond();
      } while (!synchronizingFile.exists());
    } else {
      do {
        waiter.tickASecond();
      } while (synchronizingFile.exists());
View Full Code Here

      do {
        waiter.tickASecond();
      } while (!synchronizingFile.exists());
    } else {
      do {
        waiter.tickASecond();
      } while (synchronizingFile.exists());
    }
  }

  @AfterClass
View Full Code Here

    File file = new File(downloaderRoot, relative.toString());

    // give some seconds for the file to download
    H2HWaiter waiter = new H2HWaiter(10);
    do {
      waiter.tickASecond();
    } while (!file.exists());

    Assert.assertTrue(file.exists());
    if (originalFile.isFile()) {
      Assert.assertEquals(FileUtils.readFileToString(originalFile), FileUtils.readFileToString(file));
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.