Beispiel #1
0
 @Test
 public void testStandbyWithFederation() throws Exception {
   setUp(true, "testStandbyWithFederation");
   LOG.info("DAFS testStandby");
   long lastTxId = getLastTxId();
   cluster.killPrimary(0, false);
   // make sure to consume all transactions
   cluster.getStandbyAvatar(0).avatar.quiesceStandby(lastTxId);
   checkStandby();
 }
Beispiel #2
0
  @Test
  public void testFailOverWithFederation() throws Exception {
    setUp(true, "testFailoverWithFederation");
    LOG.info("DAFS testFailOver");
    long lastTxId = getLastTxId();
    cluster.killPrimary(0);
    cluster.failOver(0);
    cluster.restartStandby(0);
    cluster.waitAvatarNodesActive(0);
    cluster.waitDataNodesActive(0);
    // make sure to consume all transactions.
    cluster.getStandbyAvatar(0).avatar.quiesceStandby(lastTxId);

    try {
      Thread.sleep(2000);
    } catch (InterruptedException ignore) {
    }

    checkStandby();
    checkPrimary();
  }