cpoerschke commented on code in PR #1003:
URL: https://github.com/apache/solr/pull/1003#discussion_r973005178


##########
solr/core/src/test/org/apache/solr/search/TestRandomCollapseQParserPlugin.java:
##########
@@ -82,7 +82,6 @@ public static void buildIndexAndClient() throws Exception {
 
   @AfterClass
   public static void cleanupStatics() {

Review Comment:
   How about marking `NULL_POLICIES` final to make it clearer that it is static 
but not being cleaned up here because it's never changed in the `BeforeClass` 
code?



##########
solr/modules/hdfs/src/test/org/apache/solr/hdfs/search/TestRecoveryHdfs.java:
##########
@@ -109,17 +109,13 @@ public static void afterClass() throws Exception {
     IOUtils.closeQuietly(fs);
     fs = null;
     try {
-      deleteCore();
+      HdfsTestUtil.teardownClass(dfsCluster);
     } finally {
-      try {
-        HdfsTestUtil.teardownClass(dfsCluster);
-      } finally {
-        dfsCluster = null;
-        hdfsUri = null;
-        System.clearProperty("solr.ulog.dir");
-        System.clearProperty("test.build.data");
-        System.clearProperty("test.cache.data");
-      }
+      dfsCluster = null;
+      hdfsUri = null;
+      System.clearProperty("solr.ulog.dir");
+      System.clearProperty("test.build.data");
+      System.clearProperty("test.cache.data");

Review Comment:
   Looks like `HdfsTestUtil.teardownClass` already does this.
   ```suggestion
   ```



##########
solr/modules/hdfs/src/test/org/apache/solr/hdfs/update/TestHdfsUpdateLog.java:
##########
@@ -72,17 +72,13 @@ public static void afterClass() throws Exception {
     IOUtils.closeQuietly(fs);
     fs = null;
     try {
-      deleteCore();
+      HdfsTestUtil.teardownClass(dfsCluster);
     } finally {
-      try {
-        HdfsTestUtil.teardownClass(dfsCluster);
-      } finally {
-        dfsCluster = null;
-        hdfsUri = null;
-        System.clearProperty("solr.ulog.dir");
-        System.clearProperty("test.build.data");
-        System.clearProperty("test.cache.data");
-      }
+      dfsCluster = null;
+      hdfsUri = null;
+      System.clearProperty("solr.ulog.dir");
+      System.clearProperty("test.build.data");
+      System.clearProperty("test.cache.data");

Review Comment:
   Looks like `HdfsTestUtil.teardownClass` already does this.
   ```suggestion
   ```



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to