You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2015/01/30 18:15:23 UTC

[02/13] qpid-jms git commit: test that a bad option in the URI results in failure when using setProperties containing the remoteURI property

test that a bad option in the URI results in failure when using setProperties containing the remoteURI property


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/72a52216
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/72a52216
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/72a52216

Branch: refs/heads/master
Commit: 72a52216cf4145ee8fb3870741a24a4e54f1fadb
Parents: 47a83bc
Author: Robert Gemmell <ro...@apache.org>
Authored: Fri Jan 30 10:39:44 2015 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Fri Jan 30 10:39:44 2015 +0000

----------------------------------------------------------------------
 .../apache/qpid/jms/JmsConnectionFactoryTest.java    | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/72a52216/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsConnectionFactoryTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsConnectionFactoryTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsConnectionFactoryTest.java
index 927834b..6504317 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsConnectionFactoryTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsConnectionFactoryTest.java
@@ -134,6 +134,21 @@ public class JmsConnectionFactoryTest extends QpidJmsTestCase {
     }
 
     @Test
+    public void testSetPropertiesWithBadUriOptionCausesFail() throws Exception {
+        JmsConnectionFactory cf = new JmsConnectionFactory();
+
+        Map<String, String> props = new HashMap<String, String>();
+        props.put("remoteURI", "amqp://localhost:1234?jms.badOption=true");
+
+        try {
+            cf.setProperties(props);
+            fail("Should have thrown exception");
+        } catch (IllegalArgumentException iae) {
+            // expected
+        }
+    }
+
+    @Test
     public void testGetProperties() throws Exception {
         String clientID = getTestName();
         String queuePrefix = "q:";


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org