diff options
author | Rajith Muditha Attapattu <rajith@apache.org> | 2010-10-18 16:06:19 +0000 |
---|---|---|
committer | Rajith Muditha Attapattu <rajith@apache.org> | 2010-10-18 16:06:19 +0000 |
commit | 8e53bc375ef2bfb4b05cc32b4a8c0042d95b9ec2 (patch) | |
tree | 9f418d581a08ff00d289538b5f161661482e8eab | |
parent | b28371f57920a2b8546304f2ae74888627c409c7 (diff) | |
download | qpid-python-8e53bc375ef2bfb4b05cc32b4a8c0042d95b9ec2.tar.gz |
QPID-2339
Added a test case for the above JIRA.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1023879 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java | 22 | ||||
-rw-r--r-- | java/test-profiles/08StandaloneExcludes | 2 |
2 files changed, 24 insertions, 0 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java b/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java index 51fa29b36a..04fc611cd1 100644 --- a/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java +++ b/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java @@ -271,6 +271,28 @@ public class ConnectionTest extends QpidBrokerTestCase } connection.close(); } + + public void testUnsupportedSASLMechanism() throws Exception + { + BrokerDetails broker = getBroker(); + broker.setProperty(BrokerDetails.OPTIONS_SASL_MECHS, "MY_MECH"); + + try + { + Connection connection = new AMQConnection(broker.toString(), "guest", "guest", + null, "test"); + connection.close(); + fail("The client should throw a ConnectionException stating the" + + " broker does not support the SASL mech specified by the client"); + } + catch (Exception e) + { + assertTrue("Incorrect exception thrown", + e.getMessage().contains("The following SASL mechanisms " + + "[MY_MECH]" + + " specified by the client are not supported by the broker")); + } + } public static junit.framework.Test suite() { diff --git a/java/test-profiles/08StandaloneExcludes b/java/test-profiles/08StandaloneExcludes index 3e98a8a10f..0650707f00 100644 --- a/java/test-profiles/08StandaloneExcludes +++ b/java/test-profiles/08StandaloneExcludes @@ -16,3 +16,5 @@ org.apache.qpid.test.client.queue.QueuePolicyTest#testRejectPolicy // Those tests are written against the 0.10 path org.apache.qpid.test.unit.message.UTF8Test#* org.apache.qpid.client.MessageListenerTest#testSynchronousRecieveNoWait + +org.apache.qpid.test.unit.client.connection.ConnectionTest#testUnsupportedSASLMechanism |