qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject svn commit: r1163459 - /qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java
Date Wed, 31 Aug 2011 00:25:27 GMT
Author: rajith
Date: Wed Aug 31 00:25:26 2011
New Revision: 1163459

URL: http://svn.apache.org/viewvc?rev=1163459&view=rev
Log:
QPID-3395 Added a test case for this issue.

Modified:
    qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java

Modified: qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java?rev=1163459&r1=1163458&r2=1163459&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java
(original)
+++ qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java
Wed Aug 31 00:25:26 2011
@@ -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 extend
             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}"));
+        }
+        
+    }
 }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message