Author: borges
Date: 2012-02-03 08:27:53 -0500 (Fri, 03 Feb 2012)
New Revision: 12081
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/client/StoreConfigTest.java
Log:
Restore: improved test code, only catch the expected exception
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/client/StoreConfigTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/client/StoreConfigTest.java 2012-02-03
13:27:36 UTC (rev 12080)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/client/StoreConfigTest.java 2012-02-03
13:27:53 UTC (rev 12081)
@@ -74,17 +74,15 @@
jmsServer.createConnectionFactory(false, nonPersisted, "/nonPersisted"
);
- boolean ex = false;
try
{
jmsServer.addConnectionFactoryToJNDI("np", "/someCF");
+ fail("Failure expected and the API let duplicates");
}
- catch (Exception expected)
+ catch (HornetQException expected)
{
- ex = true;
+ // expected
}
-
- assertTrue(ex);
openCon("/someCF");
@@ -104,18 +102,15 @@
jmsServer.start();
jmsServer.addConnectionFactoryToJNDI("tst", "/newJNDI");
-
- ex = false;
try
{
jmsServer.addConnectionFactoryToJNDI("tst", "/newJNDI");
+ fail("Failure expected and the API let duplicates");
}
- catch (Exception expected)
+ catch (HornetQException expected)
{
- ex = true;
+ // expected
}
- assertTrue(ex);
-
openCon("/someCF");
openCon("/someCF2");
openCon("/newJNDI");
Show replies by date