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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]