Apache Lucene open-source search software
SOLR-7599: Rename ExternalCollectionsTest to CollectionStateFormat2Test
Shalin Shekhar Mangarbb0176fdd279
diff --git a/solr/core/src/test/org/apache/solr/cloud/ExternalCollectionsTest.java b/solr/core/src/test/org/apache/solr/cloud/CollectionStateFormat2Test.javasimilarity index 82%rename from solr/core/src/test/org/apache/solr/cloud/ExternalCollectionsTest.javarename to solr/core/src/test/org/apache/solr/cloud/CollectionStateFormat2Test.javaindex 113b2d2ffef..affe27c23ee 100644--- a/solr/core/src/test/org/apache/solr/cloud/ExternalCollectionsTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/CollectionStateFormat2Test.java@@ -27,53 +27,34 @@ import org.apache.solr.common.params.ModifiableSolrParams;import org.apache.zookeeper.data.Stat;import org.junit.Test;-public class ExternalCollectionsTest extends AbstractFullDistribZkTestBase {- private CloudSolrClient client;-- @Override- public void distribSetUp() throws Exception {- super.distribSetUp();- System.setProperty("numShards", Integer.toString(sliceCount));- System.setProperty("solr.xml.persist", "true");- client = createCloudClient(null);- }-- @Override- public void distribTearDown() throws Exception {- super.distribTearDown();- client.close();- }+public class CollectionStateFormat2Test extends AbstractFullDistribZkTestBase {protected String getSolrXml() {return "solr-no-core.xml";}- public ExternalCollectionsTest() {- }--@Test@ShardsFixed(num = 4)public void test() throws Exception {- testZkNodeLocation();- testConfNameAndCollectionNameSame();+ try (CloudSolrClient client = createCloudClient(null)) {+ testZkNodeLocation(client);+ testConfNameAndCollectionNameSame(client);+ }}--@Overrideprotected String getStateFormat() {return "2";}- private void testConfNameAndCollectionNameSame() throws Exception{+ private void testConfNameAndCollectionNameSame(CloudSolrClient client) throws Exception{// .system collection precreates the configsetcreateCollection(".system", client, 2, 1);waitForRecoveriesToFinish(".system", false);}- private void testZkNodeLocation() throws Exception{+ private void testZkNodeLocation(CloudSolrClient client) throws Exception{String collectionName = "myExternColl";