oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From magicaltr...@apache.org
Subject svn commit: r1518620 - in /oodt/trunk/filemgr: pom.xml src/test/org/apache/oodt/cas/filemgr/catalog/TestDataSourceCatalog.java
Date Thu, 29 Aug 2013 12:10:35 GMT
Author: magicaltrout
Date: Thu Aug 29 12:10:35 2013
New Revision: 1518620

URL: http://svn.apache.org/r1518620
Log:
adjust test to allow other databases to be configured at test time

Modified:
    oodt/trunk/filemgr/pom.xml
    oodt/trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestDataSourceCatalog.java

Modified: oodt/trunk/filemgr/pom.xml
URL: http://svn.apache.org/viewvc/oodt/trunk/filemgr/pom.xml?rev=1518620&r1=1518619&r2=1518620&view=diff
==============================================================================
--- oodt/trunk/filemgr/pom.xml (original)
+++ oodt/trunk/filemgr/pom.xml Thu Aug 29 12:10:35 2013
@@ -261,5 +261,12 @@
       <version>2.2-beta1</version>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+      <version>5.1.26</version>
+      <scope>test</scope>
+    </dependency>
+
   </dependencies>
 </project>

Modified: oodt/trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestDataSourceCatalog.java
URL: http://svn.apache.org/viewvc/oodt/trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestDataSourceCatalog.java?rev=1518620&r1=1518619&r2=1518620&view=diff
==============================================================================
--- oodt/trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestDataSourceCatalog.java
(original)
+++ oodt/trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestDataSourceCatalog.java
Thu Aug 29 12:10:35 2013
@@ -61,14 +61,19 @@ public class TestDataSourceCatalog exten
         System.setProperty("java.util.logging.config.file", new File(
                 "./src/main/resources/logging.properties").getAbsolutePath());
 
+        if(System.getProperty("overrideProperties") == null){
+
+            try {
+                System.getProperties().load(
+                        new FileInputStream(
+                                "./src/main/resources/filemgr.properties"));
+            } catch (Exception e) {
+                fail(e.getMessage());
+            }
+
+
         // first load the example configuration
-        try {
-            System.getProperties().load(
-                    new FileInputStream(
-                            "./src/main/resources/filemgr.properties"));
-        } catch (Exception e) {
-            fail(e.getMessage());
-        }
+
 
         // get a temp directory
         File tempDir = null;
@@ -103,7 +108,16 @@ public class TestDataSourceCatalog exten
         System.setProperty(
                 "org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver",
                 "org.hsqldb.jdbcDriver");
-
+        }
+        else{
+            try {
+                System.getProperties().load(
+                        new FileInputStream(
+                                System.getProperty("overrideProperties")));
+            } catch (Exception e) {
+                fail(e.getMessage());
+            }
+        }
         // now override the val layer ones
         System.setProperty("org.apache.oodt.cas.filemgr.validation.dirs",
                 "file://"



Mime
View raw message