You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2018/01/15 02:20:39 UTC
[2/3] lucene-solr:jira/solr-11702: SOLR-11702:
LeaderInitiatedRecoveryOnShardRestartTest should test on old lir
SOLR-11702: LeaderInitiatedRecoveryOnShardRestartTest should test on old lir
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4879156e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4879156e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4879156e
Branch: refs/heads/jira/solr-11702
Commit: 4879156e82c50076e26be93cad5c822ee363b6ce
Parents: e65896b
Author: Cao Manh Dat <da...@apache.org>
Authored: Mon Jan 15 09:20:14 2018 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Mon Jan 15 09:20:14 2018 +0700
----------------------------------------------------------------------
.../cloud/LeaderInitiatedRecoveryOnShardRestartTest.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4879156e/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnShardRestartTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnShardRestartTest.java b/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnShardRestartTest.java
index 0bc0394..0c46689 100644
--- a/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnShardRestartTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnShardRestartTest.java
@@ -18,6 +18,7 @@ package org.apache.solr.cloud;
import java.lang.invoke.MethodHandles;
import java.util.Map;
+import java.util.Properties;
import org.apache.lucene.util.LuceneTestCase.Nightly;
import org.apache.lucene.util.LuceneTestCase.Slow;
@@ -26,6 +27,7 @@ import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.client.solrj.impl.HttpSolrClient.RemoteSolrException;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.request.QueryRequest;
import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.common.cloud.SolrZkClient;
@@ -87,7 +89,14 @@ public class LeaderInitiatedRecoveryOnShardRestartTest extends AbstractFullDistr
String testCollectionName = "all_in_lir";
String shardId = "shard1";
- createCollection(testCollectionName, "conf1", 1, 3, 1);
+ CollectionAdminRequest.createCollection(testCollectionName, "conf1", 1, 3)
+ .setCreateNodeSet("")
+ .process(cloudClient);
+ Properties oldLir = new Properties();
+ oldLir.setProperty("lirVersion", "old");
+ for (int i = 0; i < 3; i++) {
+ CollectionAdminRequest.addReplicaToShard(testCollectionName, "shard1").setProperties(oldLir).process(cloudClient);
+ }
waitForRecoveriesToFinish(testCollectionName, false);