fix JMSClientNioTest close timeout leaving broker hanging about

This commit is contained in:
gtully 2014-12-08 13:54:46 +00:00
parent 80a4fb7cb7
commit db65c2e027
2 changed files with 9 additions and 8 deletions

View File

@ -217,12 +217,13 @@ public class AmqpTestSupport {
LOG.debug("tearDown started."); LOG.debug("tearDown started.");
future.get(60, TimeUnit.SECONDS); future.get(60, TimeUnit.SECONDS);
} catch (TimeoutException e) { } catch (TimeoutException e) {
throw new Exception("startBroker timed out"); throw new Exception("stopBroker timed out");
} } finally {
executor.shutdownNow(); executor.shutdownNow();
if (killHungThreads("tearDown")) { if (killHungThreads("tearDown")) {
LOG.warn("HUNG THREADS in setUp"); LOG.warn("HUNG THREADS in tearDown");
}
} }
} }

View File

@ -45,11 +45,11 @@ public class JMSClientTestSupport extends AmqpTestSupport {
future.get(60, TimeUnit.SECONDS); future.get(60, TimeUnit.SECONDS);
} catch (TimeoutException e) { } catch (TimeoutException e) {
throw new Exception("CloseConnection timed out"); throw new Exception("CloseConnection timed out");
} } finally {
executor.shutdownNow(); executor.shutdownNow();
super.tearDown(); super.tearDown();
} }
}
public class CloseConnectionTask implements Callable<Boolean> { public class CloseConnectionTask implements Callable<Boolean> {
@Override @Override