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/20 14:43:43 UTC
[lucene-solr] branch reference_impl updated: @254 - Fix another
instance of this.
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 b109818 @254 - Fix another instance of this.
b109818 is described below
commit b109818ddacf1887443f7f05f77011351794fa63
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Mon Jul 20 09:42:38 2020 -0500
@254 - Fix another instance of this.
---
solr/core/src/test/org/apache/solr/util/OrderedExecutorTest.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/util/OrderedExecutorTest.java b/solr/core/src/test/org/apache/solr/util/OrderedExecutorTest.java
index 72e7410..1f30b66 100644
--- a/solr/core/src/test/org/apache/solr/util/OrderedExecutorTest.java
+++ b/solr/core/src/test/org/apache/solr/util/OrderedExecutorTest.java
@@ -55,7 +55,6 @@ public class OrderedExecutorTest extends SolrTestCase {
@Test
public void testLockWhenQueueIsFull() {
- final ExecutorService controlExecutor = ExecutorUtil.newMDCAwareCachedThreadPool("testLockWhenQueueIsFull_control");
final OrderedExecutor orderedExecutor = new OrderedExecutor
(TEST_NIGHTLY ? 10 : 3, ExecutorUtil.newMDCAwareCachedThreadPool("testLockWhenQueueIsFull_test"));
@@ -68,7 +67,7 @@ public class OrderedExecutorTest extends SolrTestCase {
final CountDownLatch latchAAA = new CountDownLatch(1);
orderedExecutor.execute(lockId, () -> {
try {
- if (latchAAA.await(120, TimeUnit.SECONDS)) {
+ if (latchAAA.await(10, TimeUnit.SECONDS)) {
events.add("AAA");
} else {
events.add("AAA Timed Out");
@@ -80,7 +79,7 @@ public class OrderedExecutorTest extends SolrTestCase {
});
// BBB doesn't care about the latch, but because it uses the same lockId, it's blocked on AAA
// so we execute it in a background thread...
- controlExecutor.execute(() -> {
+ testExecutor.execute(() -> {
orderedExecutor.execute(lockId, () -> {
events.add("BBB");
});
@@ -97,7 +96,6 @@ public class OrderedExecutorTest extends SolrTestCase {
fail("interupt while trying to poll event queue");
}
} finally {
- ExecutorUtil.shutdownAndAwaitTermination(controlExecutor);
orderedExecutor.shutdownAndAwaitTermination();
}
}