activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-5606
Date Mon, 02 Mar 2015 16:20:13 GMT
Repository: activemq
Updated Branches:
  refs/heads/master ecebd2413 -> bb83bf574


https://issues.apache.org/jira/browse/AMQ-5606

if the client throws the correct exception type, don't fail the test.

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

Branch: refs/heads/master
Commit: bb83bf5746df6a4089d0b73ec90457b77bda4c39
Parents: ecebd24
Author: Timothy Bish <tabish121@gmail.com>
Authored: Mon Mar 2 11:19:57 2015 -0500
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Mon Mar 2 11:19:57 2015 -0500

----------------------------------------------------------------------
 .../activemq/transport/amqp/JMSClientSimpleAuthTest.java      | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/bb83bf57/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientSimpleAuthTest.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientSimpleAuthTest.java
b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientSimpleAuthTest.java
index 064e132..2f559e6 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientSimpleAuthTest.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientSimpleAuthTest.java
@@ -25,6 +25,7 @@ import java.net.URI;
 
 import javax.jms.Connection;
 import javax.jms.JMSException;
+import javax.jms.JMSSecurityException;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
@@ -71,6 +72,8 @@ public class JMSClientSimpleAuthTest {
             Thread.sleep(500);
             connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
             fail("Expected JMSException");
+        } catch (JMSSecurityException ex) {
+            LOG.debug("Failed to authenticate connection with no user / password.");
         } catch (JMSException e) {
             Exception linkedException = e.getLinkedException();
             if (linkedException != null && linkedException instanceof ConnectionClosedException)
{
@@ -91,6 +94,8 @@ public class JMSClientSimpleAuthTest {
             Thread.sleep(500);
             connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
             fail("Expected JMSException");
+        } catch (JMSSecurityException ex) {
+            LOG.debug("Failed to authenticate connection with no user / password.");
         } catch (JMSException e)  {
             Exception linkedException = e.getLinkedException();
             if (linkedException != null && linkedException instanceof ConnectionClosedException)
{
@@ -111,6 +116,8 @@ public class JMSClientSimpleAuthTest {
             Thread.sleep(500);
             connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
             fail("Expected JMSException");
+        } catch (JMSSecurityException ex) {
+            LOG.debug("Failed to authenticate connection with no user / password.");
         } catch (JMSException e) {
             Exception linkedException = e.getLinkedException();
             if (linkedException != null && linkedException instanceof ConnectionClosedException)
{


Mime
View raw message