@Test(timeout=60000)
public void testThreadDumpCaptureAfterNNStateChange() throws Exception {

  MockNameNodeResourceChecker mockResourceChecker =
      new MockNameNodeResourceChecker(conf);
  mockResourceChecker.setResourcesAvailable(false);
  cluster.getNameNode(0).getNamesystem()
      .setNNResourceChecker(mockResourceChecker);
  waitForHAState(0, HAServiceState.STANDBY);
  while (!thr1.zkfc.isThreadDumpCaptured()) {
    Thread.sleep(1000);
  }
}