You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2016/05/23 14:25:34 UTC
lucene-solr:branch_6x: SOLR-9132: Fix request-counting logic in
ConnectionReuseTest
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x 3f358dda9 -> 6c3754161
SOLR-9132: Fix request-counting logic in ConnectionReuseTest
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6c375416
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6c375416
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6c375416
Branch: refs/heads/branch_6x
Commit: 6c37541618b080e1d44607dd29d56626b7fd1ccc
Parents: 3f358dd
Author: Alan Woodward <ro...@apache.org>
Authored: Mon May 23 15:25:25 2016 +0100
Committer: Alan Woodward <ro...@apache.org>
Committed: Mon May 23 15:25:25 2016 +0100
----------------------------------------------------------------------
.../org/apache/solr/client/solrj/ConnectionReuseTest.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c375416/solr/core/src/test/org/apache/solr/client/solrj/ConnectionReuseTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/client/solrj/ConnectionReuseTest.java b/solr/core/src/test/org/apache/solr/client/solrj/ConnectionReuseTest.java
index 86540b3..77d4990 100644
--- a/solr/core/src/test/org/apache/solr/client/solrj/ConnectionReuseTest.java
+++ b/solr/core/src/test/org/apache/solr/client/solrj/ConnectionReuseTest.java
@@ -78,7 +78,12 @@ public class ConnectionReuseTest extends SolrCloudTestCase {
switch (random().nextInt(3)) {
case 0:
// currently only testing with 1 thread
- return getConcurrentUpdateSolrClient(url.toString() + "/" + COLLECTION, httpClient, 6, 1);
+ return new ConcurrentUpdateSolrClient(url.toString() + "/" + COLLECTION, httpClient, 6, 1) {
+ @Override
+ public void handleError(Throwable ex) {
+ // we're expecting random errors here, don't spam the logs
+ }
+ };
case 1:
return getHttpSolrClient(url.toString() + "/" + COLLECTION, httpClient);
case 2:
@@ -130,6 +135,7 @@ public class ConnectionReuseTest extends SolrCloudTestCase {
}
if (!done && i > 0 && i < cnt2 - 1 && client instanceof ConcurrentUpdateSolrClient
&& random().nextInt(10) > 8) {
+ log.info("Pausing - should start a new request");
queueBreaks++;
done = true;
Thread.sleep(350); // wait past streaming client poll time of 250ms
@@ -160,7 +166,7 @@ public class ConnectionReuseTest extends SolrCloudTestCase {
// we can't fully control queue polling breaking up requests - allow a bit of leeway
log.info("Outer loop count: {}", cnt1);
log.info("Queue breaks: {}", queueBreaks);
- int exp = cnt1 + queueBreaks + 2;
+ int exp = queueBreaks + 3;
log.info("Expected: {}", exp);
log.info("Requests: {}", metrics.getRequestCount());
assertTrue(