mirror of https://github.com/apache/lucene.git
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:
parent
863f85bddf
commit
bb0176fdd2
|
@ -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";
|
||||
|
Loading…
Reference in New Issue