db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r659936 - /db/torque/test/trunk/test-project/src/java/org/apache/torque/BaseRuntimeTestCase.java
Date Sun, 25 May 2008 08:07:00 GMT
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


Mime
View raw message