portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r725567 - in /portals/jetspeed-2/portal/trunk/components: jetspeed-cm/src/test/java/org/apache/jetspeed/cache/ jetspeed-file-cache/src/test/java/org/apache/jetspeed/cache/file/ jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/ca...
Date Thu, 11 Dec 2008 03:54:16 GMT
Author: rwatler
Date: Wed Dec 10 19:54:15 2008
New Revision: 725567

URL: http://svn.apache.org/viewvc?rev=725567&view=rev
Log:
Cache Related Tests Cleanup
- ensure cache configuration initialized properly in event tests run individually


Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestContentCache.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestDecorationContentCache.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-file-cache/src/test/java/org/apache/jetspeed/cache/file/TestFileCache.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/TestDatabasePageManagerCache.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestContentCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestContentCache.java?rev=725567&r1=725566&r2=725567&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestContentCache.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestContentCache.java
Wed Dec 10 19:54:15 2008
@@ -26,6 +26,7 @@
 import net.sf.ehcache.CacheManager;
 
 import org.apache.jetspeed.aggregator.PortletContent;
+import org.apache.jetspeed.cache.impl.EhCacheConfigResource;
 import org.apache.jetspeed.cache.impl.EhPortletContentCacheImpl;
 import org.apache.jetspeed.cache.impl.JetspeedCacheKeyGenerator;
 import org.apache.jetspeed.mockobjects.request.MockRequestContext;
@@ -51,6 +52,7 @@
     public void testContentCacheByUser() throws Exception
     {
         // initialize ehCache
+        EhCacheConfigResource.getInstance(EhCacheConfigResource.EHCACHE_CONFIG_RESOURCE_DEFAULT,
true);
         CacheManager cacheManager = new CacheManager();
         Cache ehContentCache = new Cache("ehPortletContentCache", 10000, false, false, 28800,
28800);
         cacheManager.addCache(ehContentCache);
@@ -144,6 +146,7 @@
     public void testContentCacheBySession() throws Exception
     {
         // initialize ehCache
+        EhCacheConfigResource.getInstance(EhCacheConfigResource.EHCACHE_CONFIG_RESOURCE_DEFAULT,
true);
         CacheManager cacheManager = new CacheManager();
         Cache ehContentCache = new Cache("ehPortletContentCache", 10000, false, false, 28800,
28800);
         cacheManager.addCache(ehContentCache);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestDecorationContentCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestDecorationContentCache.java?rev=725567&r1=725566&r2=725567&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestDecorationContentCache.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestDecorationContentCache.java
Wed Dec 10 19:54:15 2008
@@ -25,6 +25,7 @@
 import net.sf.ehcache.Cache;
 import net.sf.ehcache.CacheManager;
 
+import org.apache.jetspeed.cache.impl.EhCacheConfigResource;
 import org.apache.jetspeed.cache.impl.EhDecorationContentCacheImpl;
 import org.apache.jetspeed.cache.impl.JetspeedCacheKeyGenerator;
 import org.apache.jetspeed.mockobjects.request.MockRequestContext;
@@ -50,6 +51,7 @@
     public void testContentCacheByUser() throws Exception
     {
         // initialize ehCache
+        EhCacheConfigResource.getInstance(EhCacheConfigResource.EHCACHE_CONFIG_RESOURCE_DEFAULT,
true);
         CacheManager cacheManager = new CacheManager();
         Cache ehContentCache = new Cache("ehDecorationContentCache", 10000, false, false,
28800, 28800);
         cacheManager.addCache(ehContentCache);
@@ -143,6 +145,7 @@
     public void testContentCacheBySession() throws Exception
     {
         // initialize ehCache
+        EhCacheConfigResource.getInstance(EhCacheConfigResource.EHCACHE_CONFIG_RESOURCE_DEFAULT,
true);
         CacheManager cacheManager = new CacheManager();
         Cache ehContentCache = new Cache("ehDecorationContentCache", 10000, false, false,
28800, 28800);
         cacheManager.addCache(ehContentCache);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-file-cache/src/test/java/org/apache/jetspeed/cache/file/TestFileCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-file-cache/src/test/java/org/apache/jetspeed/cache/file/TestFileCache.java?rev=725567&r1=725566&r2=725567&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-file-cache/src/test/java/org/apache/jetspeed/cache/file/TestFileCache.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-file-cache/src/test/java/org/apache/jetspeed/cache/file/TestFileCache.java
Wed Dec 10 19:54:15 2008
@@ -33,6 +33,7 @@
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.jetspeed.cache.CacheElement;
+import org.apache.jetspeed.cache.impl.EhCacheConfigResource;
 import org.apache.jetspeed.cache.impl.EhCacheImpl;
 import org.apache.jetspeed.test.JetspeedTestCase;
 
@@ -73,6 +74,7 @@
         super.setUp();
         
         // initialize ehCache
+        EhCacheConfigResource.getInstance(EhCacheConfigResource.EHCACHE_CONFIG_RESOURCE_DEFAULT,
true);
         CacheManager cacheManager = new CacheManager();
         Cache ehPageFileCache = new Cache("ehPageFileCache", CACHE_SIZE, false, false, 0,
0);
         cacheManager.addCache(ehPageFileCache);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/TestDatabasePageManagerCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/TestDatabasePageManagerCache.java?rev=725567&r1=725566&r2=725567&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/TestDatabasePageManagerCache.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/TestDatabasePageManagerCache.java
Wed Dec 10 19:54:15 2008
@@ -546,7 +546,7 @@
         for (final URL pathURL : urlLoader.getURLs())
         {
             // convert path URL to file path
-            String path = new File(pathURL.toURI()).getCanonicalPath();
+            final String path = new File(pathURL.toURI()).getCanonicalPath();
 
             // build class path
             if (classPathBuilder.length() > 0)



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