You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2021/02/21 16:57:55 UTC

[lucene-solr] branch reference_impl_dev updated: @1370 Test hardening.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl_dev by this push:
     new efc7511  @1370 Test hardening.
efc7511 is described below

commit efc751172976e0c02f10fcffa25880f4b0a47230
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Sun Feb 21 10:57:22 2021 -0600

    @1370 Test hardening.
    
    Took 9 minutes
---
 .../src/test/org/apache/solr/schema/DocValuesMissingTest.java | 11 +++++++++++
 .../src/test/org/apache/solr/schema/TestOmitPositions.java    |  6 ++++++
 .../test-framework/src/java/org/apache/solr/SolrTestCase.java |  4 ++--
 3 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/schema/DocValuesMissingTest.java b/solr/core/src/test/org/apache/solr/schema/DocValuesMissingTest.java
index b44e8e3..bd757a0 100644
--- a/solr/core/src/test/org/apache/solr/schema/DocValuesMissingTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/DocValuesMissingTest.java
@@ -17,6 +17,7 @@
 package org.apache.solr.schema;
 
 import org.apache.solr.SolrTestCaseJ4;
+import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -29,12 +30,22 @@ public class DocValuesMissingTest extends SolrTestCaseJ4 {
   public static void beforeDocValuesMissingTest() throws Exception {
     initCore("solrconfig-basic.xml", "schema-docValuesMissing.xml");
   }
+
+  @AfterClass
+  public static void afterDocValuesMissingTest() {
+    deleteCore();
+  }
   
   @Override
   public void setUp() throws Exception {
     super.setUp();
+  }
+
+  @Override
+  public void tearDown() throws Exception {
     clearIndex();
     assertU(commit());
+    super.tearDown();
   }
   
   /** numeric default lucene sort (relative to presumed default value of 0) */
diff --git a/solr/core/src/test/org/apache/solr/schema/TestOmitPositions.java b/solr/core/src/test/org/apache/solr/schema/TestOmitPositions.java
index 0fcc9fe..22637ed 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestOmitPositions.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestOmitPositions.java
@@ -17,6 +17,7 @@
 package org.apache.solr.schema;
 
 import org.apache.solr.SolrTestCaseJ4;
+import org.junit.AfterClass;
 import org.junit.BeforeClass;
 
 public class TestOmitPositions extends SolrTestCaseJ4 {
@@ -28,6 +29,11 @@ public class TestOmitPositions extends SolrTestCaseJ4 {
     assertU(adoc("id", "2", "nopositionstext", "test test test test test test test test test test test test test", "text", "have a nice day"));
     assertU(commit());
   }
+
+  @AfterClass
+  public static void afterTestOmitPositions() {
+    deleteCore();
+  }
   
   public void testFrequencies() {
     // doc 2 should be ranked above doc 1
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
index 8f557c7..f67b8d6 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
@@ -702,10 +702,10 @@ public class SolrTestCase extends Assert {
       thread.interrupt();
       return true;
     }
-    if (thread.getName().contains(ParWork.ROOT_EXEC_NAME + "-") || thread.getName().contains("ParWork-")) {
+    if (thread.getName().contains(ParWork.ROOT_EXEC_NAME + "-") || thread.getName().contains("ParWork-") || thread.getName().contains("Core-")) {
       log.warn("interrupt on {}", thread.getName());
       try {
-        thread.join(250);
+        thread.join(50);
       } catch (InterruptedException e) {
 
       }