modules/plugins/oracle/pom.xml | 37 ++++------ modules/plugins/oracle/src/test/java/org/rhq/plugins/oracle/OracleServerComponentTest.java | 2 2 files changed, 16 insertions(+), 23 deletions(-)
New commits: commit 2967bf90637cc80e7d43484adfc7826bb7b9c033 Author: Stefan Negrea snegrea@redhat.com Date: Wed Jan 25 14:33:40 2012 -0600
Use a more direct approach to disable tests. The tests will now run only oracle-test profile is explictly invoked.
Also corrected property bindings for database connection settings.
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml index 9a1f93e..509a614 100644 --- a/modules/plugins/oracle/pom.xml +++ b/modules/plugins/oracle/pom.xml @@ -26,24 +26,11 @@
</dependencies>
- <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skipTests>true</skipTests> - </configuration> - </plugin> - </plugins> - </build> - </profile> + <properties> + <skipTests>true</skipTests> + </properties>
+ <profiles>
<profile> <id>ojdbc-driver</id> @@ -53,7 +40,7 @@ </property> </activation>
- <!-- Make sure the Oracle JDBC jar gets included in the plugin jar's lib dir. --> + <!-- Make sure the Oracle JDBC jar gets included in the plugin jar's lib dir. -->
<build> <plugins> @@ -166,6 +153,11 @@ <activation> <activeByDefault>false</activeByDefault> </activation> + + <properties> + <skipTests>false</skipTests> + </properties> + <dependencies> <dependency> <groupId>com.oracle</groupId> @@ -181,15 +173,15 @@ <systemProperties> <property> <name>oracle.url</name> - <value>${oracle.url}</value> + <value>${rhq.test.ds.connection-url}</value> </property> <property> - <name>oracle.userid</name> - <value>${oracle.userid}</value> + <name>oracle.username</name> + <value>${rhq.test.ds.user-name}</value> </property> <property> <name>oracle.password</name> - <value>${oracle.password}</value> + <value>${rhq.test.ds.password}</value> </property> </systemProperties> <!-- The below is required for tests to run against Oracle. @@ -209,6 +201,7 @@ <activation> <activeByDefault>false</activeByDefault> </activation> + <build> <plugins> <plugin> diff --git a/modules/plugins/oracle/src/test/java/org/rhq/plugins/oracle/OracleServerComponentTest.java b/modules/plugins/oracle/src/test/java/org/rhq/plugins/oracle/OracleServerComponentTest.java index 949aaae..d9d2fb0 100644 --- a/modules/plugins/oracle/src/test/java/org/rhq/plugins/oracle/OracleServerComponentTest.java +++ b/modules/plugins/oracle/src/test/java/org/rhq/plugins/oracle/OracleServerComponentTest.java @@ -49,7 +49,7 @@ public class OracleServerComponentTest extends ComponentTest { protected void setConfiguration(Configuration configuration, ResourceType resourceType) { if (resourceType.getName().equals(ORACLE_SERVER)) { log.info(configuration.getProperties()); - Pattern p = Pattern.compile("jdbc:.*:@(.*):(\d+)/(\w++)"); + Pattern p = Pattern.compile("jdbc:.*:@(.*):(\d+):(\w++)"); String url = System.getProperty("oracle.url"); if (url == null) throw new IllegalStateException("oracle.url system property not set");