You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jb...@apache.org on 2016/03/22 04:40:51 UTC

lucene-solr:branch_6_0: SOLR-8882: Wait for checkpoint in DaemonStream, TopicStream testcase

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6_0 9a4c1dd15 -> a9057e63f


SOLR-8882: Wait for checkpoint in DaemonStream, TopicStream testcase


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

Branch: refs/heads/branch_6_0
Commit: a9057e63f2d5a2e461bc0148ddd86abc2546782b
Parents: 9a4c1dd
Author: jbernste <jb...@apache.org>
Authored: Mon Mar 21 23:37:51 2016 -0400
Committer: jbernste <jb...@apache.org>
Committed: Mon Mar 21 23:46:24 2016 -0400

----------------------------------------------------------------------
 .../client/solrj/io/stream/StreamingTest.java   | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a9057e63/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java
index 165029f..3091a19 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java
@@ -1390,6 +1390,26 @@ public class StreamingTest extends AbstractFullDistribZkTestBase {
 
     daemonStream.open();
 
+    // Wait for the checkpoint
+    CloudJettyRunner jetty = this.cloudJettys.get(0);
+
+    Map params1 = new HashMap();
+    params1.put("qt","/get");
+    params1.put("ids","50000000");
+    params1.put("fl","id");
+    int count = 0;
+    while(count == 0) {
+      SolrStream solrStream = new SolrStream(jetty.url, params1);
+      List<Tuple> tuples = getTuples(solrStream);
+      count = tuples.size();
+      if(count > 0) {
+        Tuple t = tuples.get(0);
+        assertTrue(t.getLong("id") == 50000000);
+      } else {
+        System.out.println("###### Waiting for checkpoint #######:" + count);
+      }
+    }
+
     indexr(id, "0", "a_s", "hello0", "a_i", "0", "a_f", "1");
     indexr(id, "2", "a_s", "hello0", "a_i", "2", "a_f", "2");
     indexr(id, "3", "a_s", "hello0", "a_i", "3", "a_f", "3");