Examples of waitMsecs()


Examples of org.apache.giraph.zk.PredicateLock.waitMsecs()

    boolean gotPredicate = event.waitMsecs(2);
    assertTrue(gotPredicate);
    event.reset();
    when(mockTime.getMilliseconds()).
        thenReturn(0L).thenReturn(2L);
    gotPredicate = event.waitMsecs(0);
    assertFalse(gotPredicate);
  }

  /**
   * Thread signaled test for {@link PredicateLock#waitForever()}
View Full Code Here

Examples of org.apache.giraph.zk.PredicateLock.waitMsecs()

    event.waitForever();
    try {
      signalThread.join();
    } catch (InterruptedException e) {
    }
    assertTrue(event.waitMsecs(0));
  }

  /**
   * Thread signaled test to make sure the the event is signaled correctly
   *
 
View Full Code Here

Examples of org.apache.giraph.zk.PredicateLock.waitMsecs()

  @Test
  public void testWaitMsecs() {
    BspEvent event = new PredicateLock(getStubProgressable());
    Thread signalThread = new SignalThread(event);
    signalThread.start();
    boolean gotPredicate = event.waitMsecs(2000);
    assertTrue(gotPredicate);
    try {
      signalThread.join();
    } catch (InterruptedException e) {
    }
View Full Code Here

Examples of org.apache.giraph.zk.PredicateLock.waitMsecs()

    assertTrue(gotPredicate);
    try {
      signalThread.join();
    } catch (InterruptedException e) {
    }
    gotPredicate = event.waitMsecs(0);
    assertTrue(gotPredicate);
  }
}
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.