You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2019/07/17 00:59:36 UTC
[activemq-artemis] branch master updated: ARTEMIS-2408 Effectively
reverting FileDescriptors to fix tests
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new 20ca827 ARTEMIS-2408 Effectively reverting FileDescriptors to fix tests
new 7545500 This closes #2756
20ca827 is described below
commit 20ca827d79282ca41b4f60f28e6b09333c3d82d5
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Tue Jul 16 20:47:50 2019 -0400
ARTEMIS-2408 Effectively reverting FileDescriptors to fix tests
At this commit point NetworkFailureFailoverTest would hung indefinetly
---
.../core/remoting/server/impl/RemotingServiceImpl.java | 15 +--------------
.../artemis/core/server/impl/ActiveMQServerImpl.java | 2 --
.../activemq/artemis/tests/util/ActiveMQTestBase.java | 4 ----
3 files changed, 1 insertion(+), 20 deletions(-)
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 6a69b3e..416e9a9 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<Acceptor, Future<?>> 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<Acceptor, Future<?>> 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 24be17c..68ca620 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 19a3919..b48af77 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();