Package org.apache.giraph.zk

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


    /**
     * Single threaded case
     */
    public void testEvent() {
        BspEvent event = new PredicateLock();
        event.signal();
        boolean gotPredicate = event.waitMsecs(-1);
        assertTrue(gotPredicate == true);
        event.reset();
        gotPredicate = event.waitMsecs(0);
        assertTrue(gotPredicate == false);
View Full Code Here


  public void testEvent() {
    Time mockTime = mock(Time.class);
    when(mockTime.getMilliseconds()).
        thenReturn(0L).thenReturn(2L);
    BspEvent event = new PredicateLock(getStubProgressable(), 1, mockTime);
    event.signal();
    boolean gotPredicate = event.waitMsecs(2);
    assertTrue(gotPredicate);
    event.reset();
    when(mockTime.getMilliseconds()).
        thenReturn(0L).thenReturn(2L);
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.