SOLR-8046: HdfsCollectionsAPIDistributedZkTest checks that no transaction logs failed to be opened during the test but does not isolate this to the test and could fail due to other tests.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1703827 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2015-09-18 12:52:52 +00:00
parent e8bb3e4757
commit 1d80b3678d
1 changed files with 4 additions and 1 deletions

View File

@ -37,16 +37,19 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
})
public class HdfsCollectionsAPIDistributedZkTest extends CollectionsAPIDistributedZkTest {
private static MiniDFSCluster dfsCluster;
private static long initialFailLogsCount;
@BeforeClass
public static void setupClass() throws Exception {
dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath());
System.setProperty("solr.hdfs.blockcache.enabled", "false");
initialFailLogsCount = HdfsUpdateLog.INIT_FAILED_LOGS_COUNT.get();
}
@AfterClass
public static void teardownClass() throws Exception {
assertEquals(0, HdfsUpdateLog.INIT_FAILED_LOGS_COUNT.get());
// there should be no new fails from this test
assertEquals(0, HdfsUpdateLog.INIT_FAILED_LOGS_COUNT.get() - initialFailLogsCount);
HdfsTestUtil.teardownClass(dfsCluster);
System.clearProperty("solr.hdfs.blockcache.enabled");
dfsCluster = null;