Author: mvdb
Date: Tue Jan 17 13:54:00 2006
New Revision: 369936
URL: http://svn.apache.org/viewcvs?rev=369936&view=rev
Log:
Make connection data static, so there is only one connection for the tests,
instead of way too many.
The main reason I hit this issue, is that firebird doesn't allow foreignkey
creation when there is more than one connection to the database.
Modified:
db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java
Modified:
db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java
URL:
http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java?rev=369936&r1=369935&r2=369936&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java
(original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java
Tue Jan 17 13:54:00 2006
@@ -49,9 +49,9 @@
public static final String PLATFORM_PROPERTY = "ddlutils.platform";
/** The data source to test against. */
- private DataSource _dataSource;
+ private static DataSource _dataSource;
/** The database name. */
- private String _databaseName;
+ private static String _databaseName;
/** The database model. */
private Database _model;
@@ -69,6 +69,10 @@
*/
private void init()
{
+ if (_dataSource != null)
+ {
+ return;
+ }
Properties props = new Properties();
String propFile = System.getProperty(JDBC_PROPERTIES_PROPERTY);