SOLR-7599: Rename ExternalCollectionsTest to CollectionStateFormat2Test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1682174 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2015-05-28 08:49:54 +00:00
parent 863f85bddf
commit bb0176fdd2
1 changed files with 7 additions and 26 deletions

View File

@ -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);
}
}
@Override
protected String getStateFormat() {
return "2";
}
private void testConfNameAndCollectionNameSame() throws Exception{
private void testConfNameAndCollectionNameSame(CloudSolrClient client) throws Exception{
// .system collection precreates the configset
createCollection(".system", client, 2, 1);
waitForRecoveriesToFinish(".system", false);
}
private void testZkNodeLocation() throws Exception{
private void testZkNodeLocation(CloudSolrClient client) throws Exception{
String collectionName = "myExternColl";