DFSZKFailoverController extends ZKFailoverController { @VisibleForTesting boolean isThreadDumpCaptured() { return isThreadDumpCaptured; } private  DFSZKFailoverController(Configuration conf,
      NNHAServiceTarget localTarget); static DFSZKFailoverController create(Configuration conf); @Override void loginAsFCUser(); static void main(String args[]); @Override List<HAServiceTarget> getAllOtherNodes();  }
@Test(timeout=60000) public void testThreadDumpCaptureAfterNNStateChange() throws Exception { NameNodeResourceChecker mockResourceChecker = Mockito.mock( NameNodeResourceChecker.class); Mockito.doReturn(false).when(mockResourceChecker).hasAvailableDiskSpace(); cluster.getNameNode(0).getNamesystem() .setNNResourceChecker(mockResourceChecker); waitForHAState(0, HAServiceState.STANDBY); while (!thr1.zkfc.isThreadDumpCaptured()) { Thread.sleep(1000); } }