activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [2/2] activemq-artemis git commit: ARTEMIS-482 testsuite fixes:
Date Wed, 20 Apr 2016 13:06:14 GMT
ARTEMIS-482 testsuite fixes:

The new Executor operationr needs to be synchronized as a few tests are failing because of
this
another fix on the test base class


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/bd3d0492
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/bd3d0492
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/bd3d0492

Branch: refs/heads/master
Commit: bd3d0492fd03978f14bb77427d02640af4a31dbd
Parents: d142c2b
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Tue Apr 19 18:50:56 2016 -0400
Committer: Martyn Taylor <mtaylor@redhat.com>
Committed: Wed Apr 20 14:05:17 2016 +0100

----------------------------------------------------------------------
 .../activemq/artemis/core/remoting/impl/invm/InVMConnector.java  | 4 ++--
 .../org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bd3d0492/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
index c222d0d..9f965ea 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
@@ -94,14 +94,14 @@ public class InVMConnector extends AbstractConnector {
 
    private static ExecutorService threadPoolExecutor;
 
-   public static void resetThreadPool() {
+   public static synchronized void resetThreadPool() {
       if (threadPoolExecutor != null) {
          threadPoolExecutor.shutdown();
          threadPoolExecutor = null;
       }
    }
 
-   private static ExecutorService getInVMExecutor() {
+   private static synchronized ExecutorService getInVMExecutor() {
       if (threadPoolExecutor == null) {
          if (ActiveMQClient.globalThreadMaxPoolSize <= -1) {
             threadPoolExecutor = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(), Executors.defaultThreadFactory());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bd3d0492/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
index fc4d957..c9824a0 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
@@ -234,7 +234,6 @@ public abstract class ActiveMQTestBase extends Assert {
       closeAllServerLocatorsFactories();
 
       try {
-         assertAllExecutorsFinished();
          assertAllClientConsumersAreClosed();
          assertAllClientProducersAreClosed();
          assertAllClientSessionsAreClosed();
@@ -275,6 +274,7 @@ public abstract class ActiveMQTestBase extends Assert {
             s.shutdown();
          }
          InVMConnector.resetThreadPool();
+         assertAllExecutorsFinished();
 
 
          //clean up pools before failing


Mime
View raw message