modules/enterprise/gui/installer-war/pom.xml
| 4 ++
modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
| 19 ++++------
2 files changed, 12 insertions(+), 11 deletions(-)
New commits:
commit cf001e9bc410896e57b7767164711fd8f819ccd8
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Dec 15 16:00:57 2011 -0500
DBInstallationTest needs to use its own dedicated database
DBInstallationTest runs through several database upgrades and it has
been using the same database as other tests on a jenkins build. This bug
probably goes back to the initial implementation. It wasn't a problem
previously because most if not all tests run before DBInstallationTest.
To avoid causing interference with other tests, it should use its own
dedicated database. This commit includes a fix for postgresql but not
for oracle. Oracle will have to be addressed separately.
diff --git a/modules/enterprise/gui/installer-war/pom.xml
b/modules/enterprise/gui/installer-war/pom.xml
index 7f79832..bd1474a 100644
--- a/modules/enterprise/gui/installer-war/pom.xml
+++ b/modules/enterprise/gui/installer-war/pom.xml
@@ -35,6 +35,8 @@
<product.help.guide.agent>Running+the+RHQ+Agent</product.help.guide.agent>
<product.help.FAQ>FAQ</product.help.FAQ>
<
product.help.config.props>http://support.rhq-project.org/display/JOPR2...
+
+
<rhq.db.installation.test.db-name>rhq_installer_test_db</rhq.db.installation.test.db-name>
</properties>
<dependencies>
@@ -149,6 +151,8 @@
<rhq.db.admin.password>${rhq.db.admin.password}</rhq.db.admin.password>
<rhq.test.ds.user-name>${rhq.test.ds.user-name}</rhq.test.ds.user-name>
<rhq.test.ds.password>${rhq.test.ds.password}</rhq.test.ds.password>
+
<rhq.db.installation.test.db-name>${rhq.db.installation.test.db-name}</rhq.db.installation.test.db-name>
+
<rhq.db.installation.test.connection-url>jdbc:postgresql://${rhq.test.ds.server-name}:5432/${rhq.db.installation.test.db-name}</rhq.db.installation.test.connection-url>
</systemPropertyVariables>
</configuration>
</plugin>
diff --git
a/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
b/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
index 6633cb7..3bff054 100644
---
a/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
+++
b/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
@@ -23,17 +23,14 @@
package org.rhq.enterprise.installer;
-import java.io.File;
-import java.net.URL;
-import java.util.Properties;
-
+import org.rhq.core.db.reset.DBReset;
+import org.rhq.core.db.setup.DBSetup;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import org.rhq.core.db.reset.DBReset;
-import org.rhq.core.db.setup.DBSetup;
-import org.rhq.enterprise.installer.ServerInformation;
-import org.rhq.enterprise.installer.ServerProperties;
+import java.io.File;
+import java.net.URL;
+import java.util.Properties;
/**
* The tests in this class exercise the dbsetup/dbupgrade code that is run in the
installer. The tests currently only
@@ -46,12 +43,12 @@ import org.rhq.enterprise.installer.ServerProperties;
public class DBInstallationTest {
private final String LOG_DIRECTORY = System.getProperty("java.io.tmpdir",
"rhq/installer-test");
- private final String DB_NAME = System.getProperty("rhq.test.ds.db-name",
"rhq_installer_test_db");
+ private final String DB_NAME =
System.getProperty("rhq.db.installation.test.db-name",
"rhq_installer_test_db");
private final String USERNAME = System.getProperty("rhq.test.ds.user-name",
"rhqadmin");
private final String PASSWORD = System.getProperty("rhq.test.ds.password",
"rhqadmin");
private final String SERVER = System.getProperty("rhq.test.ds.server-name",
"127.0.0.1");
- private final String DB_URL =
System.getProperty("rhq.test.ds.connection-url", "jdbc:postgresql://"
+ SERVER
- + ":5432/" + DB_NAME);
+ private final String DB_URL =
System.getProperty("rhq.db.installation.test.connection-url",
+ "jdbc:postgresql://" + SERVER + ":5432/" + DB_NAME);
private final String ADMIN_USERNAME =
System.getProperty("rhq.db.admin.username", "postgres");
private final String ADMIN_PASSWORD =
System.getProperty("rhq.db.admin.password", "postgres");
private static final String DB_TYPE_MAPPING =
System.getProperty("rhq.test.ds.type-mapping", "PostgreSQL");