You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/08/31 13:30:52 UTC
[lucene-solr] branch reference_impl_dev updated: @644 Try and help
this test a little - it can rarely cause a hang due to socket timeout.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/reference_impl_dev by this push:
new 36fbcee @644 Try and help this test a little - it can rarely cause a hang due to socket timeout.
36fbcee is described below
commit 36fbcee6eb8892908c57d43a03fd7fa96b503d3e
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Mon Aug 31 08:30:28 2020 -0500
@644 Try and help this test a little - it can rarely cause a hang due to socket timeout.
---
.../solr/client/solrj/io/stream/SolrStream.java | 1 +
.../client/solrj/io/graph/GraphExpressionTest.java | 24 +++++++---------------
2 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java
index e17a768..8ea764f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java
@@ -126,6 +126,7 @@ public class SolrStream extends TupleStream {
if (!distrib) {
((ModifiableSolrParams) requestParams).add("distrib","false");
}
+ assert tupleStreamParser == null;
tupleStreamParser = constructParser(client, requestParams);
} catch (Exception e) {
ParWork.propegateInterrupt(e);
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphExpressionTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphExpressionTest.java
index 7d303f4..ab3a9b7 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphExpressionTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphExpressionTest.java
@@ -73,7 +73,6 @@ import org.junit.Test;
**/
@Slow
-//@Ignore // nocommit flakey
@LuceneTestCase.SuppressCodecs({"Lucene3x", "Lucene40","Lucene41","Lucene42","Lucene45"})
public class GraphExpressionTest extends SolrCloudTestCase {
@@ -247,7 +246,6 @@ public class GraphExpressionTest extends SolrCloudTestCase {
}
@Test
- @Ignore // nocommit - look again after i go through streaming again
public void testGatherNodesStream() throws Exception {
new UpdateRequest()
@@ -306,6 +304,7 @@ public class GraphExpressionTest extends SolrCloudTestCase {
"maxDocFreq=\"2\","+
"gather=\"basket_s\")";
+ stream.close();
stream = (GatherNodesStream)factory.constructStream(docFreqExpr);
stream.setStreamContext(context);
@@ -321,6 +320,7 @@ public class GraphExpressionTest extends SolrCloudTestCase {
"walk=\"node->basket_s\"," +
"gather=\"product_s\", count(*), avg(price_f), sum(price_f), min(price_f), max(price_f))";
+ stream.close();
stream = (GatherNodesStream)factory.constructStream(expr2);
context = new StreamContext();
@@ -359,6 +359,7 @@ public class GraphExpressionTest extends SolrCloudTestCase {
"walk=\"product4, product7->product_s\"," +
"gather=\"basket_s\")";
+ stream.close();
stream = (GatherNodesStream)factory.constructStream(expr);
context = new StreamContext();
@@ -377,6 +378,7 @@ public class GraphExpressionTest extends SolrCloudTestCase {
"walk=\"product4, product7->product_s\"," +
"gather=\"basket_s\", fq=\"-basket_s:basket4\")";
+ stream.close();
stream = (GatherNodesStream)factory.constructStream(expr);
context = new StreamContext();
@@ -389,8 +391,8 @@ public class GraphExpressionTest extends SolrCloudTestCase {
assertTrue(tuples.get(0).getString("node").equals("basket2"));
assertTrue(tuples.get(1).getString("node").equals("basket3"));
+ stream.close();
cache.close();
-
}
@@ -489,6 +491,7 @@ public class GraphExpressionTest extends SolrCloudTestCase {
"min(price_f), " +
"max(price_f))))";
+ stream.close();
stream = factory.constructStream(expr2);
context = new StreamContext();
@@ -513,6 +516,7 @@ public class GraphExpressionTest extends SolrCloudTestCase {
assert(tuple2.getLong("docFreq") == 8);
assert(tuple2.getDouble("avg(price_f)") == 1);
+ stream.close();
cache.close();
}
@@ -586,10 +590,6 @@ public class GraphExpressionTest extends SolrCloudTestCase {
cache.close();
}
-
-
-
-
@Test
public void testGatherNodesFriendsStream() throws Exception {
@@ -914,11 +914,6 @@ public class GraphExpressionTest extends SolrCloudTestCase {
client.close();
}
-
-
-
-
-
private String readString(InputStreamReader reader) throws Exception{
StringBuilder builder = new StringBuilder();
int c = 0;
@@ -929,9 +924,6 @@ public class GraphExpressionTest extends SolrCloudTestCase {
return builder.toString();
}
-
-
-
protected List<Tuple> getTuples(TupleStream tupleStream) throws IOException {
tupleStream.open();
List<Tuple> tuples = new ArrayList();
@@ -973,8 +965,6 @@ public class GraphExpressionTest extends SolrCloudTestCase {
throw new Exception("Longs not equal:"+expected+" : "+actual);
}
-
-
return true;
}