You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2019/05/01 18:34:53 UTC
[lucene-solr] branch branch_8x updated: SOLR-12833: Test should use
ExecutorUtil
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new 688c8d2 SOLR-12833: Test should use ExecutorUtil
688c8d2 is described below
commit 688c8d285f46340b507f8767e49f57845744f7f5
Author: David Smiley <ds...@apache.org>
AuthorDate: Wed May 1 14:30:35 2019 -0400
SOLR-12833: Test should use ExecutorUtil
(cherry picked from commit 1f91932ba45d92c0ccedbdb2a24a57cc77808fae)
---
.../update/processor/DistributedUpdateProcessorTest.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/update/processor/DistributedUpdateProcessorTest.java b/solr/core/src/test/org/apache/solr/update/processor/DistributedUpdateProcessorTest.java
index 33820ac..c141177 100644
--- a/solr/core/src/test/org/apache/solr/update/processor/DistributedUpdateProcessorTest.java
+++ b/solr/core/src/test/org/apache/solr/update/processor/DistributedUpdateProcessorTest.java
@@ -17,23 +17,19 @@
package org.apache.solr.update.processor;
-import static org.hamcrest.CoreMatchers.is;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.Mockito.doReturn;
-
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.function.Function;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.common.params.ModifiableSolrParams;
+import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.request.LocalSolrQueryRequest;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.update.AddUpdateCommand;
@@ -49,6 +45,10 @@ import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
+import static org.hamcrest.CoreMatchers.is;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.Mockito.doReturn;
+
public class DistributedUpdateProcessorTest extends SolrTestCaseJ4 {
@Rule
@@ -57,10 +57,10 @@ public class DistributedUpdateProcessorTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
- executor = Executors.newCachedThreadPool();
+ executor = ExecutorUtil.newMDCAwareCachedThreadPool(getClassName());
initCore("solr/collection1/conf/solrconfig.xml","solr/collection1/conf/schema-minimal-with-another-uniqkey.xml");
}
-
+
@AfterClass
public static void AfterClass() {
executor.shutdown();