Java Code Examples for org.apache.hadoop.test.GenericTestUtils#assertNoThreadsMatching()
The following examples show how to use
org.apache.hadoop.test.GenericTestUtils#assertNoThreadsMatching() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestEditLogAutoroll.java From hadoop with Apache License 2.0 | 6 votes |
@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() + ".*"); }
Example 2
Source File: TestEditLogAutoroll.java From big-c with Apache License 2.0 | 6 votes |
@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() + ".*"); }
Example 3
Source File: TestQuorumJournalManager.java From hadoop with Apache License 2.0 | 5 votes |
@After public void shutdown() throws IOException { IOUtils.cleanup(LOG, toClose.toArray(new Closeable[0])); // Should not leak clients between tests -- this can cause flaky tests. // (See HDFS-4643) GenericTestUtils.assertNoThreadsMatching(".*IPC Client.*"); if (cluster != null) { cluster.shutdown(); } }
Example 4
Source File: TestQuorumJournalManager.java From big-c with Apache License 2.0 | 5 votes |
@After public void shutdown() throws IOException { IOUtils.cleanup(LOG, toClose.toArray(new Closeable[0])); // Should not leak clients between tests -- this can cause flaky tests. // (See HDFS-4643) GenericTestUtils.assertNoThreadsMatching(".*IPC Client.*"); if (cluster != null) { cluster.shutdown(); } }
Example 5
Source File: TestCheckpoint.java From hadoop with Apache License 2.0 | 4 votes |
@After public void checkForSNNThreads() { GenericTestUtils.assertNoThreadsMatching(".*SecondaryNameNode.*"); }
Example 6
Source File: TestCheckpoint.java From big-c with Apache License 2.0 | 4 votes |
@After public void checkForSNNThreads() { GenericTestUtils.assertNoThreadsMatching(".*SecondaryNameNode.*"); }