diff options
author | Rajith Muditha Attapattu <rajith@apache.org> | 2011-08-31 00:25:26 +0000 |
---|---|---|
committer | Rajith Muditha Attapattu <rajith@apache.org> | 2011-08-31 00:25:26 +0000 |
commit | 7b6796e8686e2a2e4a818693d10bf5367b39ce11 (patch) | |
tree | 6d920a8762f3f2e8644ea5a18bade5c1a58c034d /java/client/src | |
parent | 194c0650de9ae929c46b75c25ff2a226dfbb2b3a (diff) | |
download | qpid-python-7b6796e8686e2a2e4a818693d10bf5367b39ce11.tar.gz |
QPID-3395 Added a test case for this issue.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1163459 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
-rw-r--r-- | java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java index a1b14d5723..2052312f54 100644 --- a/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java +++ b/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java @@ -24,6 +24,7 @@ import java.util.Properties; import javax.jms.Queue; import javax.jms.Topic; +import javax.naming.ConfigurationException; import javax.naming.Context; import javax.naming.InitialContext; @@ -67,4 +68,22 @@ public class JNDIPropertyFileTest extends TestCase assertEquals("Topic" + i + "WithSpace",bindingKey.asString()); } } + + public void testConfigurationErrors() throws Exception + { + Properties properties = new Properties(); + properties.put("java.naming.factory.initial", "org.apache.qpid.jndi.PropertiesFileInitialContextFactory"); + properties.put("destination.my-queue","amq.topic/test;create:always}"); + + try + { + ctx = new InitialContext(properties); + fail("A configuration exception should be thrown with details about the address syntax error"); + } + catch(ConfigurationException e) + { + assertTrue("Incorrect exception", e.getMessage().contains("Failed to parse entry: amq.topic/test;create:always}")); + } + + } } |