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 2008/05/25 10:07:00 UTC

svn commit: r659936 - /db/torque/test/trunk/test-project/src/java/org/apache/torque/BaseRuntimeTestCase.java

Author: tfischer
Date: Sun May 25 01:06:59 2008
New Revision: 659936

URL: http://svn.apache.org/viewvc?rev=659936&view=rev
Log:
Made initialisation of Torque in test project more robust.
I am not sure why this happens, but when running all tests in the test project eclipse complains that Torque is not initialized though it was initialized before. I believe this is due to peculiarities in class loading in JUnit

Modified:
    db/torque/test/trunk/test-project/src/java/org/apache/torque/BaseRuntimeTestCase.java

Modified: db/torque/test/trunk/test-project/src/java/org/apache/torque/BaseRuntimeTestCase.java
URL: http://svn.apache.org/viewvc/db/torque/test/trunk/test-project/src/java/org/apache/torque/BaseRuntimeTestCase.java?rev=659936&r1=659935&r2=659936&view=diff
==============================================================================
--- db/torque/test/trunk/test-project/src/java/org/apache/torque/BaseRuntimeTestCase.java (original)
+++ db/torque/test/trunk/test-project/src/java/org/apache/torque/BaseRuntimeTestCase.java Sun May 25 01:06:59 2008
@@ -44,9 +44,6 @@
     protected static final String CONFIG_FILE_SYSTEM_PROPERTY
             = "torque.configuration.file";
 
-    /** Whether torque has been initialized. */
-    static boolean hasInitialized = false;
-
     /**
      * Creates a new instance.
      */
@@ -63,12 +60,11 @@
     {
         synchronized (BaseRuntimeTestCase.class)
         {
-            if (!hasInitialized)
+            if (!Torque.isInit())
             {
                 Torque.init(
                         System.getProperty(
                                 CONFIG_FILE_SYSTEM_PROPERTY));
-                hasInitialized = true;
             }
         }
     }



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