@After
  public void tearDown() throws Exception {
    String className = StopBlockingRegionObserver.class.getName();
    for (JVMClusterUtil.RegionServerThread t : cluster.getRegionServerThreads()) {
      HRegionServer rs = t.getRegionServer();
      RegionServerCoprocessorHost cpHost = rs.getRegionServerCoprocessorHost();
      StopBlockingRegionObserver cp =
        (StopBlockingRegionObserver) cpHost.findCoprocessor(className);
      cp.setStopAllowed(true);
    }
    testUtil.shutdownMiniCluster();
  }
Tests around regionserver shutdown and abort
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java