You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/09/23 07:30:19 UTC

[GitHub] [solr] dweiss commented on a change in pull request #300: SOLR-15644: Test thread leak management.

dweiss commented on a change in pull request #300:
URL: https://github.com/apache/solr/pull/300#discussion_r714536837



##########
File path: solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
##########
@@ -144,12 +152,107 @@ public static void checkSyspropForceBeforeClassAssumptionFailure() {
   public void checkSyspropForceBeforeAssumptionFailure() {
     // ant test -Dargs="-Dtests.force.assumption.failure.before=true"
     final String PROP = "tests.force.assumption.failure.before";
-    assumeFalse(PROP + " == true",
-                systemPropertyAsBoolean(PROP, false));
+    assumeFalse(PROP + " == true", systemPropertyAsBoolean(PROP, false));
   }
-  
+
   @AfterClass
-  public static void shutdownLogger() throws Exception {
+  public static void shutdownLogger() {
     StartupLoggingUtils.shutdown();
   }
+
+  protected static void interruptThreadsOnTearDown() {

Review comment:
       This can be done (or maybe is, didn't look at the current annotation on SolrTestCase/LuceneTestCase) automatically by the test framework -- see thread lingering/ actions on these annotations.
   
   https://github.com/randomizedtesting/randomizedtesting/blob/master/examples/maven/src/main/java/com/carrotsearch/examples/randomizedrunner/Test010Lingering.java#L40-L43




-- 
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-unsubscribe@solr.apache.org

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



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