risdenk commented on a change in pull request #599: SOLR-13307: Ensure HDFS tests clear System properties they set URL: https://github.com/apache/lucene-solr/pull/599#discussion_r263789982
########## File path: solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java ########## @@ -30,35 +30,34 @@ @Slow @Nightly -// 12-Jun-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") -// commented out on: 24-Dec-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Jul-2018 @ThreadLeakFilters(defaultFilters = true, filters = { BadHdfsThreadsFilter.class // hdfs currently leaks thread(s) }) public class HdfsTlogReplayBufferedWhileIndexingTest extends TlogReplayBufferedWhileIndexingTest { - + private static MiniDFSCluster dfsCluster; + public HdfsTlogReplayBufferedWhileIndexingTest() throws Exception { super(); } - private static MiniDFSCluster dfsCluster; - @BeforeClass public static void setupClass() throws Exception { - dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath()); System.setProperty("solr.hdfs.blockcache.blocksperbank", "2048"); + dfsCluster = HdfsTestUtil.setupClass(createTempDir().toFile().getAbsolutePath()); } @AfterClass public static void teardownClass() throws Exception { - HdfsTestUtil.teardownClass(dfsCluster); - dfsCluster = null; + try { + HdfsTestUtil.teardownClass(dfsCluster); + } finally { + dfsCluster = null; + System.clearProperty("solr.hdfs.blockcache.blocksperbank"); Review comment: Has never been cleaned up before. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
