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:33:09 UTC

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

Repository: lucene-solr
Updated Branches:
  refs/heads/master 4d0aa7709 -> 42262e676


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/42262e67
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/42262e67
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/42262e67

Branch: refs/heads/master
Commit: 42262e6768bc3ac9f987dd18fd97ff5103f030aa
Parents: 4d0aa77
Author: jbernste <jb...@apache.org>
Authored: Mon Mar 21 23:37:51 2016 -0400
Committer: jbernste <jb...@apache.org>
Committed: Mon Mar 21 23:38:45 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/42262e67/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");