ARTEMIS-482 fixing testsuite. Stopping Executor at the proper place
You have to stop the InVMExecutor after servers were stopped otherwise tests may hang
This commit is contained in:
parent
31e4e7d328
commit
03b2650990
|
@ -230,14 +230,9 @@ public abstract class ActiveMQTestBase extends Assert {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
for (ExecutorService s : executorSet) {
|
|
||||||
s.shutdown();
|
|
||||||
}
|
|
||||||
closeAllSessionFactories();
|
closeAllSessionFactories();
|
||||||
closeAllServerLocatorsFactories();
|
closeAllServerLocatorsFactories();
|
||||||
|
|
||||||
InVMConnector.resetThreadPool();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
assertAllExecutorsFinished();
|
assertAllExecutorsFinished();
|
||||||
assertAllClientConsumersAreClosed();
|
assertAllClientConsumersAreClosed();
|
||||||
|
@ -275,6 +270,13 @@ public abstract class ActiveMQTestBase extends Assert {
|
||||||
finally {
|
finally {
|
||||||
cleanupPools();
|
cleanupPools();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (ExecutorService s : executorSet) {
|
||||||
|
s.shutdown();
|
||||||
|
}
|
||||||
|
InVMConnector.resetThreadPool();
|
||||||
|
|
||||||
|
|
||||||
//clean up pools before failing
|
//clean up pools before failing
|
||||||
if (!exceptions.isEmpty()) {
|
if (!exceptions.isEmpty()) {
|
||||||
for (Exception exception : exceptions) {
|
for (Exception exception : exceptions) {
|
||||||
|
|
Loading…
Reference in New Issue