Package net.sf.katta.protocol

Examples of net.sf.katta.protocol.MasterQueue.peek()


    }
  }

  private MasterQueue mockBlockingOperationQueue() throws InterruptedException {
    MasterQueue queue = mock(MasterQueue.class);
    when(queue.peek()).thenAnswer(new SleepingAnswer());
    return queue;
  }

}
View Full Code Here


    assertEquals(oldIndexMD.getPath(), newIndexMD.getPath());
    assertEquals(oldIndexMD.getReplicationLevel(), newIndexMD.getReplicationLevel());

    MasterQueue queue = _protocol.publishMaster(Mocks.mockMaster());
    assertEquals(1, queue.size());
    assertThat(queue.peek(), instanceOf(IndexReinitializeOperation.class));
  }
}
View Full Code Here

    assertNull(indexMD.getDeployError());

    // balance index should have been be triggered
    Master master = Mocks.mockMaster();
    MasterQueue masterQueue = _protocol.publishMaster(master);
    MasterOperation operation = masterQueue.peek();
    assertNotNull(operation);
    assertTrue(operation instanceof BalanceIndexOperation);
  }

}
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.