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/22 00:13:41 UTC

[lucene-solr] branch reference_impl_dev updated: @1376 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 8c23be6  @1376 Test hardening.
8c23be6 is described below

commit 8c23be6450aa66a871364bfebbaaecb0b7e527b8
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Sun Feb 21 18:13:21 2021 -0600

    @1376 Test hardening.
    
    Took 3 minutes
---
 .../cloud/TestCloudPhrasesIdentificationComponent.java |  1 +
 .../test/org/apache/solr/cloud/TestSegmentSorting.java | 18 ++++++++++--------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java
index a433142..da90408 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java
@@ -116,6 +116,7 @@ public class TestCloudPhrasesIdentificationComponent extends SolrCloudTestCase {
     }
     CLIENTS.clear();
     CLOUD_CLIENT = null;
+    shutdownCluster();
   }
 
   public void testBasicPhrases() throws Exception {
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.java b/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.java
index 8465a99..b7ca45f 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestSegmentSorting.java
@@ -31,11 +31,10 @@ import org.apache.solr.client.solrj.request.schema.SchemaRequest.Field;
 import org.apache.solr.core.CoreDescriptor;
 
 import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.Rule;
 import org.junit.Test;
-import org.junit.rules.TestName;
 
 
 import org.slf4j.Logger;
@@ -55,9 +54,12 @@ public class TestSegmentSorting extends SolrCloudTestCase {
       .addConfig(configName, Paths.get(SolrTestUtil.TEST_HOME(), "collection1", "conf"))
       .configure();
   }
-  
-  @Rule public TestName testName = new TestName();
-  
+
+  @AfterClass
+  public static void afterTestSolrJErrorHandling() throws Exception {
+    shutdownCluster();
+  }
+
   @After
   public void ensureClusterEmpty() throws Exception {
     cluster.deleteAllCollections();
@@ -65,9 +67,9 @@ public class TestSegmentSorting extends SolrCloudTestCase {
   }
 
   @Before
-  public void createCollection() throws Exception {
-
-    final String collectionName = testName.getMethodName();
+  public void setUp() throws Exception {
+    super.setUp();
+    final String collectionName = getSaferTestName();
     final CloudHttp2SolrClient cloudSolrClient = cluster.getSolrClient();
     
     final Map<String, String> collectionProperties = new HashMap<>();