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/07/11 14:46:12 UTC
[lucene-solr] branch reference_impl updated: #68 Knock down 2 tests.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/reference_impl by this push:
new 64e0be6 #68 Knock down 2 tests.
64e0be6 is described below
commit 64e0be66c6cea3603beeeee2e867882db2813d85
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Sat Jul 11 09:45:58 2020 -0500
#68 Knock down 2 tests.
---
.../solrj/impl/ConcurrentUpdateSolrClientTest.java | 18 ++++++++++--------
.../solrj/routing/ReplicaListTransformerTest.java | 3 +++
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientTest.java
index 33af0de..58ea937 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientTest.java
@@ -159,17 +159,18 @@ public class ConcurrentUpdateSolrClientTest extends SolrJettyTestBase {
// ensure it doesn't block where there's nothing to do yet
concurrentClient.blockUntilFinished();
- int poolSize = 5;
+ int poolSize = TEST_NIGHTLY ? 5 : 2;
ExecutorService threadPool = ExecutorUtil.newMDCAwareFixedThreadPool(poolSize, new SolrNamedThreadFactory("testCUSS"));
- int numDocs = 100;
- int numRunnables = 5;
+ int numDocs = TEST_NIGHTLY ? 100 : 10;
+ int numRunnables = TEST_NIGHTLY ? 5 : 2;
for (int r=0; r < numRunnables; r++)
threadPool.execute(new SendDocsRunnable(String.valueOf(r), numDocs, concurrentClient));
// ensure all docs are sent
- threadPool.awaitTermination(5, TimeUnit.SECONDS);
threadPool.shutdown();
+ threadPool.awaitTermination(5, TimeUnit.SECONDS);
+
// wait until all requests are processed by CUSS
concurrentClient.blockUntilFinished();
@@ -225,7 +226,7 @@ public class ConcurrentUpdateSolrClientTest extends SolrJettyTestBase {
int cussThreadCount = 2;
int cussQueueSize = 100;
- int numDocs = TEST_NIGHTLY ? 100 : 10;
+ int numDocs = TEST_NIGHTLY ? 100 : 5;
int numRunnables = TEST_NIGHTLY ? 5 : 2;
int expected = numDocs * numRunnables;
@@ -240,16 +241,17 @@ public class ConcurrentUpdateSolrClientTest extends SolrJettyTestBase {
// Delete all existing documents.
concurrentClient.deleteByQuery("collection1", "*:*");
-
- int poolSize = 5;
+ concurrentClient.commit("collection1");
+ int poolSize = TEST_NIGHTLY ? 5 : 2;
ExecutorService threadPool = ExecutorUtil.newMDCAwareFixedThreadPool(poolSize, new SolrNamedThreadFactory("testCUSS"));
for (int r=0; r < numRunnables; r++)
threadPool.execute(new SendDocsRunnable(String.valueOf(r), numDocs, concurrentClient, "collection1"));
// ensure all docs are sent
- threadPool.awaitTermination(5, TimeUnit.SECONDS);
threadPool.shutdown();
+ threadPool.awaitTermination(5, TimeUnit.SECONDS);
+
concurrentClient.commit("collection1");
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.java
index 5e90da2..0331ef5 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.java
@@ -159,6 +159,9 @@ public class ReplicaListTransformerTest extends SolrTestCase {
transformer.transform(actualTransformed);
assertEquals(expectedTransformed, actualTransformed);
+ if (transformer instanceof HttpShardHandlerFactory) {
+ ((HttpShardHandlerFactory) transformer).close();
+ }
}
private final List<String> createRandomUrls() throws Exception {