portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r720236 - in /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page: PageManagerTestShared.java document/psml/TestCastorFileSystemDocumentHandler.java
Date Mon, 24 Nov 2008 17:51:02 GMT
Author: woonsan
Date: Mon Nov 24 09:51:01 2008
New Revision: 720236

URL: http://svn.apache.org/viewvc?rev=720236&view=rev
Log:
Fixed test cases using FileCache.

Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/document/psml/TestCastorFileSystemDocumentHandler.java

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java?rev=720236&r1=720235&r2=720236&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java
Mon Nov 24 09:51:01 2008
@@ -40,6 +40,8 @@
 
 import junit.framework.TestCase;
 
+import net.sf.ehcache.CacheManager;
+
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.cache.file.FileCache;
 import org.apache.jetspeed.idgenerator.IdGenerator;
@@ -79,6 +81,8 @@
 import org.apache.jetspeed.security.spi.impl.FragmentPermission;
 import org.apache.jetspeed.security.spi.impl.JetspeedPermissionFactory;
 import org.apache.jetspeed.security.spi.impl.PagePermission;
+import org.apache.jetspeed.cache.JetspeedCache;
+import org.apache.jetspeed.cache.impl.EhCacheImpl;
 
 /**
  * PageManagerTestShared
@@ -132,7 +136,7 @@
             dirHelper.copyFrom(webappPagesDirFile, noCVSorSVNorBackups);
 
             IdGenerator idGen = new JetspeedIdGenerator(65536,"P-","");
-            FileCache cache = new FileCache(10, 12);
+            FileCache cache = new FileCache(new EhCacheImpl(CacheManager.getInstance().getEhcache("pageFileCache")),
10);
             
             DocumentHandler psmlHandler = new CastorFileSystemDocumentHandler("/JETSPEED-INF/castor/page-mapping.xml",
Page.DOCUMENT_TYPE, PageImpl.class, baseDir + "target/testdata/" + pagesDirName, cache);
             DocumentHandler linkHandler = new CastorFileSystemDocumentHandler("/JETSPEED-INF/castor/page-mapping.xml",
Link.DOCUMENT_TYPE, LinkImpl.class, baseDir + "target/testdata/" + pagesDirName, cache);

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/document/psml/TestCastorFileSystemDocumentHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/document/psml/TestCastorFileSystemDocumentHandler.java?rev=720236&r1=720235&r2=720236&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/document/psml/TestCastorFileSystemDocumentHandler.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/document/psml/TestCastorFileSystemDocumentHandler.java
Mon Nov 24 09:51:01 2008
@@ -24,12 +24,15 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import net.sf.ehcache.CacheManager;
+
 import org.apache.jetspeed.om.page.Document;
 import org.apache.jetspeed.om.folder.psml.FolderMetaDataImpl;
 import org.apache.jetspeed.page.document.DocumentHandlerFactory;
 import org.apache.jetspeed.page.document.psml.DocumentHandlerFactoryImpl;
 import org.apache.jetspeed.test.JetspeedTestCase;
 import org.apache.jetspeed.cache.file.FileCache;
+import org.apache.jetspeed.cache.impl.EhCacheImpl;
 
 /**
  * <p>
@@ -57,12 +60,14 @@
     {
         super.setUp();
         
+        FileCache cache = new FileCache(new EhCacheImpl(CacheManager.getInstance().getEhcache("pageFileCache")),
10);
+        
         folderMetaDataDocumentHandler = new CastorFileSystemDocumentHandler(
             "/JETSPEED-INF/castor/page-mapping.xml",
             "folder.metadata",
             FolderMetaDataImpl.class,
             getBaseDir()+"src/test/testdata/pages",
-            new FileCache());
+            cache);
             
         Map handlerMap = new HashMap();
         handlerMap.put("folder.metadata", folderMetaDataDocumentHandler);



---------------------------------------------------------------------
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