You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2015/09/19 21:49:47 UTC
svn commit: r1704080 -
/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/JndiConfigurationTest.java
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