portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r702645 - in /portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics: pom.xml src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java src/test/java/org/apache/jetspeed/statistics/TestStatistics.java
Date Tue, 07 Oct 2008 21:40:50 GMT
Author: ate
Date: Tue Oct  7 14:40:49 2008
New Revision: 702645

URL: http://svn.apache.org/viewvc?rev=702645&view=rev
Log:
fixing statistics component testcases

Modified:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/pom.xml
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/statistics/TestStatistics.java

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/pom.xml?rev=702645&r1=702644&r2=702645&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/pom.xml
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/pom.xml
Tue Oct  7 14:40:49 2008
@@ -115,6 +115,10 @@
                                         <include>statistics.xml,transaction.xml,boot/datasource.xml</include>
                                     </resource>
                                     <resource>
+                                        <path>conf/jetspeed</path>
+                                        <include>jetspeed.properties</include>
+                                    </resource>
+                                    <resource>
                                         <path>db-ojb</path>
                                     </resource>
                                 </resources>

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java?rev=702645&r1=702644&r2=702645&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java
Tue Oct  7 14:40:49 2008
@@ -16,10 +16,14 @@
  */
 package org.apache.jetspeed.audit;
 
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.util.Properties;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
@@ -342,6 +346,27 @@
         }        
     }    
 
+    protected Properties getInitProperties()
+    {
+        Properties props = new Properties();
+        try 
+        {
+            InputStream is = this.getClass().getClassLoader().getResourceAsStream("jetspeed.properties");
+            if (is != null)
+                props.load(is);
+        } catch (FileNotFoundException e) 
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } 
+        catch (IOException e) 
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return props;
+    }
+    
     protected String[] getConfigurations()
     {
         return new String[]

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/statistics/TestStatistics.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/statistics/TestStatistics.java?rev=702645&r1=702644&r2=702645&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/statistics/TestStatistics.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/statistics/TestStatistics.java
Tue Oct  7 14:40:49 2008
@@ -16,6 +16,9 @@
  */
 package org.apache.jetspeed.statistics;
 
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
 import java.security.Principal;
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
@@ -23,6 +26,7 @@
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.List;
+import java.util.Properties;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
@@ -74,8 +78,6 @@
 
     public void clearDBs()
     {
-
-        
         try
         {
             DatabaseMetaData dmd = statistics.getDataSource().getConnection().getMetaData();
       
@@ -308,6 +310,27 @@
         return rc;
     }
 
+    protected Properties getInitProperties()
+    {
+        Properties props = new Properties();
+        try 
+        {
+            InputStream is = this.getClass().getClassLoader().getResourceAsStream("jetspeed.properties");
+            if (is != null)
+                props.load(is);
+        } catch (FileNotFoundException e) 
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } 
+        catch (IOException e) 
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return props;
+    }
+    
     protected String[] getConfigurations()
     {
         return new String[]



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message