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
|
||||
public void tearDown() throws Exception {
|
||||
for (ExecutorService s : executorSet) {
|
||||
s.shutdown();
|
||||
}
|
||||
closeAllSessionFactories();
|
||||
closeAllServerLocatorsFactories();
|
||||
|
||||
InVMConnector.resetThreadPool();
|
||||
|
||||
try {
|
||||
assertAllExecutorsFinished();
|
||||
assertAllClientConsumersAreClosed();
|
||||
|
@ -275,6 +270,13 @@ public abstract class ActiveMQTestBase extends Assert {
|
|||
finally {
|
||||
cleanupPools();
|
||||
}
|
||||
|
||||
for (ExecutorService s : executorSet) {
|
||||
s.shutdown();
|
||||
}
|
||||
InVMConnector.resetThreadPool();
|
||||
|
||||
|
||||
//clean up pools before failing
|
||||
if (!exceptions.isEmpty()) {
|
||||
for (Exception exception : exceptions) {
|
||||
|
|
Loading…
Reference in New Issue