@Test(timeout=60000) public void testEditLogAutoroll() throws Exception { // Make some edits final long startTxId = editLog.getCurSegmentTxId(); for (int i=0; i<11; i++) { fs.mkdirs(new Path("testEditLogAutoroll-" + i)); } // Wait for the NN to autoroll GenericTestUtils.waitFor(new Supplier<Boolean>() { @Override public Boolean get() { return editLog.getCurSegmentTxId() > startTxId; } }, 1000, 5000); // Transition to standby and make sure the roller stopped nn0.transitionToStandby(); GenericTestUtils.assertNoThreadsMatching( ".*" + NameNodeEditLogRoller.class.getSimpleName() + ".*"); }