activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: Ensure all resources shut down.
Date Mon, 18 Aug 2014 21:59:05 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 3aec42db4 -> 9b017fdb3


Ensure all resources shut down.

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/9b017fdb
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/9b017fdb
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/9b017fdb

Branch: refs/heads/trunk
Commit: 9b017fdb391ae1c5ef890e3824a77d63a490dc11
Parents: 3aec42d
Author: Timothy Bish <tabish121@gmail.com>
Authored: Mon Aug 18 17:58:58 2014 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Mon Aug 18 17:58:58 2014 -0400

----------------------------------------------------------------------
 .../activemq/transport/ws/WSTransportTest.java   | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/9b017fdb/activemq-http/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
b/activemq-http/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
index 6c99328..b133e71 100644
--- a/activemq-http/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
+++ b/activemq-http/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
@@ -17,6 +17,8 @@
 
 package org.apache.activemq.transport.ws;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 import java.io.IOException;
 import java.net.Socket;
@@ -47,8 +49,6 @@ import org.openqa.selenium.firefox.FirefoxProfile;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.junit.Assert.assertTrue;
-
 public class WSTransportTest {
 
     private static final Logger LOG = LoggerFactory.getLogger(WSTransportTest.class);
@@ -137,13 +137,21 @@ public class WSTransportTest {
         } catch(Exception e) {
             // Some tests explicitly disconnect from stomp so can ignore
         } finally {
-            stopBroker();
+            try {
+                stopBroker();
+            } catch (Exception e) {
+                LOG.warn("Error on Broker stop.");
+            }
             if (driver != null) {
-                driver.quit();
+                try {
+                    driver.quit();
+                } catch (Exception e) {}
                 driver = null;
             }
             if (server != null) {
-                server.stop();
+                try {
+                    server.stop();
+                } catch (Exception e) {}
             }
         }
     }
@@ -250,6 +258,7 @@ public class WSTransportTest {
 
             assertTrue("Should have disconnected", Wait.waitFor(new Wait.Condition() {
 
+                @Override
                 public boolean isSatisified() throws Exception {
                     return webStatus.getText().equals("Disconnected");
                 }


Mime
View raw message