Author: tfischer
Date: Sat Sep 19 19:49:46 2015
New Revision: 1704080

URL: http://svn.apache.org/viewvc?rev=1704080&view=rev
Log:
fix test error when tests are run in non-standard order

Modified:
    
db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/JndiConfigurationTest.java

Modified: 
db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/JndiConfigurationTest.java
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/JndiConfigurationTest.java?rev=1704080&r1=1704079&r2=1704080&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/JndiConfigurationTest.java
 (original)
+++ 
db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/JndiConfigurationTest.java
 Sat Sep 19 19:49:46 2015
@@ -307,7 +307,13 @@ public class JndiConfigurationTest exten
     {
         BasicDataSource dataSource = getDataSource();
         Context context = getInitialContext();
-        context.createSubcontext(JNDI_SUBCONTEXT);
+        try {
+            context.lookup(JNDI_SUBCONTEXT);
+        }
+        catch (NameNotFoundException e)
+        {
+            context.createSubcontext(JNDI_SUBCONTEXT);
+        }
         context.bind(JNDI_PATH, dataSource);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org
For additional commands, e-mail: torque-dev-h...@db.apache.org

Reply via email to