diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java index 6a69b3e214..416e9a95bf 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java @@ -32,7 +32,6 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import java.util.concurrent.Future; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; @@ -408,27 +407,15 @@ public class RemotingServiceImpl implements RemotingService, ServerConnectionLif conn.disconnect(criticalError); } - Map> acceptorFutures = new HashMap<>(); for (Acceptor acceptor : acceptors.values()) { try { - acceptorFutures.put(acceptor, acceptor.asyncStop()); + acceptor.stop(); } catch (Throwable t) { ActiveMQServerLogger.LOGGER.errorStoppingAcceptor(acceptor.getName()); } } - for (Map.Entry> acceptorFuture : acceptorFutures.entrySet()) { - if (acceptorFuture.getValue() != null) { - try { - acceptorFuture.getValue().get(); - } catch (Throwable t) { - ActiveMQServerLogger.LOGGER.errorStoppingAcceptor(acceptorFuture.getKey().getName()); - } - } - } - acceptors.clear(); - acceptorFutures.clear(); connections.clear(); connectionCountLatch.setCount(0); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java index 24be17c605..68ca620572 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java @@ -1269,8 +1269,6 @@ public class ActiveMQServerImpl implements ActiveMQServer { this.analyzer = null; } - activateCallbacks.clear(); - if (identity != null) { ActiveMQServerLogger.LOGGER.serverStopped("identity=" + identity + ",version=" + getVersion().getFullVersion(), tempNodeID, getUptime()); } else { 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 19a3919218..b48af77297 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 @@ -171,9 +171,6 @@ public abstract class ActiveMQTestBase extends Assert { @ClassRule public static ThreadLeakCheckRule leakCheckRule = new ThreadLeakCheckRule(); - @Rule - public NoProcessFilesBehind noProcessFilesBehind = new NoProcessFilesBehind(-1, 1000); - /** We should not under any circunstance create data outside of ./target * if you have a test failing because because of this rule for any reason, * even if you use afterClass events, move the test to ./target and always cleanup after @@ -279,7 +276,6 @@ public abstract class ActiveMQTestBase extends Assert { @After public void tearDown() throws Exception { - noProcessFilesBehind.tearDown(); closeAllSessionFactories(); closeAllServerLocatorsFactories();