lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbern...@apache.org
Subject lucene-solr:branch_7x: SOLR-11392: Change collection names in test case
Date Wed, 04 Oct 2017 18:58:38 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 5a123ab5c -> 8ac381a6a


SOLR-11392: Change collection names in test case


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/8ac381a6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/8ac381a6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/8ac381a6

Branch: refs/heads/branch_7x
Commit: 8ac381a6a0ce7fae1d50896f15dd4fe8307c79d6
Parents: 5a123ab
Author: Joel Bernstein <jbernste@apache.org>
Authored: Wed Oct 4 14:29:15 2017 -0400
Committer: Joel Bernstein <jbernste@apache.org>
Committed: Wed Oct 4 14:30:11 2017 -0400

----------------------------------------------------------------------
 .../solrj/io/stream/StreamExpressionTest.java   | 38 ++++++++++----------
 1 file changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8ac381a6/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
index c73adf6..36333eb 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
@@ -7556,14 +7556,14 @@ public class StreamExpressionTest extends SolrCloudTestCase {
 
   @Test
   public void testParallelExecutorStream() throws Exception {
-    CollectionAdminRequest.createCollection("workQueue", "conf", 2, 1).processAndWait(cluster.getSolrClient(),DEFAULT_TIMEOUT);
-    AbstractDistribZkTestBase.waitForRecoveriesToFinish("workQueue", cluster.getSolrClient().getZkStateReader(),
+    CollectionAdminRequest.createCollection("workQueue1", "conf", 2, 1).processAndWait(cluster.getSolrClient(),DEFAULT_TIMEOUT);
+    AbstractDistribZkTestBase.waitForRecoveriesToFinish("workQueue1", cluster.getSolrClient().getZkStateReader(),
         false, true, TIMEOUT);
-    CollectionAdminRequest.createCollection("mainCorpus", "conf", 2, 1).processAndWait(cluster.getSolrClient(),
DEFAULT_TIMEOUT);
-    AbstractDistribZkTestBase.waitForRecoveriesToFinish("mainCorpus", cluster.getSolrClient().getZkStateReader(),
+    CollectionAdminRequest.createCollection("mainCorpus1", "conf", 2, 1).processAndWait(cluster.getSolrClient(),
DEFAULT_TIMEOUT);
+    AbstractDistribZkTestBase.waitForRecoveriesToFinish("mainCorpus1", cluster.getSolrClient().getZkStateReader(),
         false, true, TIMEOUT);
-    CollectionAdminRequest.createCollection("destination", "conf", 2, 1).processAndWait(cluster.getSolrClient(),
DEFAULT_TIMEOUT);
-    AbstractDistribZkTestBase.waitForRecoveriesToFinish("destination", cluster.getSolrClient().getZkStateReader(),
+    CollectionAdminRequest.createCollection("destination1", "conf", 2, 1).processAndWait(cluster.getSolrClient(),
DEFAULT_TIMEOUT);
+    AbstractDistribZkTestBase.waitForRecoveriesToFinish("destination1", cluster.getSolrClient().getZkStateReader(),
         false, true, TIMEOUT);
 
     UpdateRequest workRequest = new UpdateRequest();
@@ -7571,27 +7571,27 @@ public class StreamExpressionTest extends SolrCloudTestCase {
 
 
     for (int i = 0; i < 500; i++) {
-      workRequest.add(id, String.valueOf(i), "expr_s", "update(destination, batchSize=50,
search(mainCorpus, q=id:"+i+", rows=1, sort=\"id asc\", fl=\"id, body_t, field_i\"))");
+      workRequest.add(id, String.valueOf(i), "expr_s", "update(destination1, batchSize=50,
search(mainCorpus1, q=id:"+i+", rows=1, sort=\"id asc\", fl=\"id, body_t, field_i\"))");
       dataRequest.add(id, String.valueOf(i), "body_t", "hello world "+i, "field_i", Integer.toString(i));
     }
 
-    workRequest.commit(cluster.getSolrClient(), "workQueue");
-    dataRequest.commit(cluster.getSolrClient(), "mainCorpus");
+    workRequest.commit(cluster.getSolrClient(), "workQueue1");
+    dataRequest.commit(cluster.getSolrClient(), "mainCorpus1");
 
-    String url = cluster.getJettySolrRunners().get(0).getBaseUrl().toString() + "/destination";
+    String url = cluster.getJettySolrRunners().get(0).getBaseUrl().toString() + "/destination1";
     TupleStream executorStream;
     ModifiableSolrParams paramsLoc;
 
     StreamFactory factory = new StreamFactory()
-        .withCollectionZkHost("workQueue", cluster.getZkServer().getZkAddress())
-        .withCollectionZkHost("mainCorpus", cluster.getZkServer().getZkAddress())
-        .withCollectionZkHost("destination", cluster.getZkServer().getZkAddress())
+        .withCollectionZkHost("workQueue1", cluster.getZkServer().getZkAddress())
+        .withCollectionZkHost("mainCorpus1", cluster.getZkServer().getZkAddress())
+        .withCollectionZkHost("destination1", cluster.getZkServer().getZkAddress())
         .withFunctionName("search", CloudSolrStream.class)
         .withFunctionName("executor", ExecutorStream.class)
         .withFunctionName("parallel", ParallelStream.class)
         .withFunctionName("update", UpdateStream.class);
 
-    String executorExpression = "parallel(workQueue, workers=2, sort=\"EOF asc\", executor(threads=3,
queueSize=100, search(workQueue, q=\"*:*\", fl=\"id, expr_s\", rows=1000, partitionKeys=id,
sort=\"id desc\")))";
+    String executorExpression = "parallel(workQueue1, workers=2, sort=\"EOF asc\", executor(threads=3,
queueSize=100, search(workQueue1, q=\"*:*\", fl=\"id, expr_s\", rows=1000, partitionKeys=id,
sort=\"id desc\")))";
     executorStream = factory.constructStream(executorExpression);
 
     StreamContext context = new StreamContext();
@@ -7600,9 +7600,9 @@ public class StreamExpressionTest extends SolrCloudTestCase {
     executorStream.setStreamContext(context);
     getTuples(executorStream);
     //Destination collection should now contain all the records in the main corpus.
-    cluster.getSolrClient().commit("destination");
+    cluster.getSolrClient().commit("destination1");
     paramsLoc = new ModifiableSolrParams();
-    paramsLoc.set("expr", "search(destination, q=\"*:*\", fl=\"id, body_t, field_i\", rows=1000,
sort=\"field_i asc\")");
+    paramsLoc.set("expr", "search(destination1, q=\"*:*\", fl=\"id, body_t, field_i\", rows=1000,
sort=\"field_i asc\")");
     paramsLoc.set("qt", "/stream");
 
     SolrStream solrStream = new SolrStream(url, paramsLoc);
@@ -7618,9 +7618,9 @@ public class StreamExpressionTest extends SolrCloudTestCase {
 
     solrStream.close();
     clientCache.close();
-    CollectionAdminRequest.deleteCollection("workQueue").process(cluster.getSolrClient());
-    CollectionAdminRequest.deleteCollection("mainCorpus").process(cluster.getSolrClient());
-    CollectionAdminRequest.deleteCollection("destination").process(cluster.getSolrClient());
+    CollectionAdminRequest.deleteCollection("workQueue1").process(cluster.getSolrClient());
+    CollectionAdminRequest.deleteCollection("mainCorpus1").process(cluster.getSolrClient());
+    CollectionAdminRequest.deleteCollection("destination1").process(cluster.getSolrClient());
   }
 
 


Mime
View raw message