This closes #2756
This commit is contained in:
commit
75455002a9
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue