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 | 470263db26077fab21685355316eb35e71b54b5e (patch) | |
tree | 81b28374132fc86be40784fb129009d9bf5dc75e | |
parent | 6e4b0d6c4e8eaefdd57bd330a6276894e1540a04 (diff) | |
download | qpid-python-470263db26077fab21685355316eb35e71b54b5e.tar.gz |
QPID-3395 Added a test case for this issue.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1163459 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java index a1b14d5723..2052312f54 100644 --- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java +++ b/qpid/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}")); + } + + } } |