Author: clebert.suconic(a)jboss.com
Date: 2011-12-05 23:13:32 -0500 (Mon, 05 Dec 2011)
New Revision: 11847
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/client/StoreConfigTest.java
Log:
JBPAPP-7504 - duplicate JNDI should throw an exception - fixing test
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/client/StoreConfigTest.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/client/StoreConfigTest.java 2011-12-06
02:56:29 UTC (rev 11846)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/client/StoreConfigTest.java 2011-12-06
04:13:32 UTC (rev 11847)
@@ -74,14 +74,17 @@
jmsServer.createConnectionFactory(false, nonPersisted, "/nonPersisted"
);
+ boolean ex = false;
try
{
jmsServer.addConnectionFactoryToJNDI("np", "/someCF");
- fail("Failure expected and the API let duplicates");
}
- catch (HornetQException expected)
+ catch (Exception expected)
{
+ ex = true;
}
+
+ assertTrue(ex);
openCon("/someCF");
@@ -101,14 +104,18 @@
jmsServer.start();
jmsServer.addConnectionFactoryToJNDI("tst", "/newJNDI");
+
+ ex = false;
try
{
jmsServer.addConnectionFactoryToJNDI("tst", "/newJNDI");
- fail("Failure expected and the API let duplicates");
}
- catch (HornetQException expected)
+ catch (Exception expected)
{
+ ex = true;
}
+ assertTrue(ex);
+
openCon("/someCF");
openCon("/someCF2");
openCon("/newJNDI");