private void startMaster() throws Exception {
    master = cluster.addMaster();
    master.start();

    for (int i = 0; i * SLEEP_INTERVAL < SLEEP_TIME; i++) {
      Thread.sleep(SLEEP_INTERVAL);
      assertTrue(master.isAlive());
    }
  }
Tests the boot order indifference between regionserver and master
hbase-server/src/test/java/org/apache/hadoop/hbase/TestClusterBootOrder.java