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.Executor;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.Future;
|
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.ThreadFactory;
|
import java.util.concurrent.ThreadFactory;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
@ -408,27 +407,15 @@ public class RemotingServiceImpl implements RemotingService, ServerConnectionLif
|
||||||
conn.disconnect(criticalError);
|
conn.disconnect(criticalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<Acceptor, Future<?>> acceptorFutures = new HashMap<>();
|
|
||||||
for (Acceptor acceptor : acceptors.values()) {
|
for (Acceptor acceptor : acceptors.values()) {
|
||||||
try {
|
try {
|
||||||
acceptorFutures.put(acceptor, acceptor.asyncStop());
|
acceptor.stop();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
ActiveMQServerLogger.LOGGER.errorStoppingAcceptor(acceptor.getName());
|
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();
|
acceptors.clear();
|
||||||
acceptorFutures.clear();
|
|
||||||
|
|
||||||
connections.clear();
|
connections.clear();
|
||||||
connectionCountLatch.setCount(0);
|
connectionCountLatch.setCount(0);
|
||||||
|
|
|
@ -1269,8 +1269,6 @@ public class ActiveMQServerImpl implements ActiveMQServer {
|
||||||
this.analyzer = null;
|
this.analyzer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
activateCallbacks.clear();
|
|
||||||
|
|
||||||
if (identity != null) {
|
if (identity != null) {
|
||||||
ActiveMQServerLogger.LOGGER.serverStopped("identity=" + identity + ",version=" + getVersion().getFullVersion(), tempNodeID, getUptime());
|
ActiveMQServerLogger.LOGGER.serverStopped("identity=" + identity + ",version=" + getVersion().getFullVersion(), tempNodeID, getUptime());
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -171,9 +171,6 @@ public abstract class ActiveMQTestBase extends Assert {
|
||||||
@ClassRule
|
@ClassRule
|
||||||
public static ThreadLeakCheckRule leakCheckRule = new ThreadLeakCheckRule();
|
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
|
/** 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,
|
* 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
|
* 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
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
noProcessFilesBehind.tearDown();
|
|
||||||
closeAllSessionFactories();
|
closeAllSessionFactories();
|
||||||
closeAllServerLocatorsFactories();
|
closeAllServerLocatorsFactories();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue