public JVMClusterUtil.RegionServerThread startRegionServerAndWait(long timeout)
    throws IOException {

    JVMClusterUtil.RegionServerThread t = startRegionServer();
    ServerName rsServerName = t.getRegionServer().getServerName();

    long start = EnvironmentEdgeManager.currentTime();
    ClusterMetrics clusterStatus = getClusterMetrics();
    while ((EnvironmentEdgeManager.currentTime() - start) < timeout) {
      if (clusterStatus != null && clusterStatus.getLiveServerMetrics().containsKey(rsServerName)) {
        return t;
      }
      Threads.sleep(100);
    }
    if (t.getRegionServer().isOnline()) {
      throw new IOException("RS: " + rsServerName + " online, but not processed by master");
    } else {
      throw new IOException("RS: " + rsServerName + " is offline");
    }
  }
Starts a region server thread and waits until its processed by master. Throws an exception when
it can't start a region server or when the region server is not processed by master within the
timeout.
@return New RegionServerThread
hbase-testing-util/src/main/java/org/apache/hadoop/hbase/MiniHBaseCluster.java