db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1704080 - /db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/JndiConfigurationTest.java
Date Sat, 19 Sep 2015 19:49:47 GMT
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-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message