You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by me...@apache.org on 2013/09/17 21:09:24 UTC

svn commit: r1524180 - /jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java

Author: metskem
Date: Tue Sep 17 19:09:24 2013
New Revision: 1524180

URL: http://svn.apache.org/r1524180
Log:
remove caches to (hopefully) make this test more predictable

Modified:
    jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java

Modified: jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java?rev=1524180&r1=1524179&r2=1524180&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java (original)
+++ jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java Tue Sep 17 19:09:24 2013
@@ -25,6 +25,7 @@ import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import junit.framework.Test;
 
+import net.sf.ehcache.CacheManager;
 import org.apache.wiki.TestEngine;
 import org.apache.wiki.WikiContext;
 import org.apache.wiki.WikiPage;
@@ -46,6 +47,7 @@ public class UndefinedPagesPluginTest ex
     public void setUp()
         throws Exception
     {
+        CacheManager.getInstance().removalAll();
         testEngine = new TestEngine(props);
 
         testEngine.saveText( "TestPage", "Reference to [Foobar]." );



Re: svn commit: r1524180 - /jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java

Posted by Ichiro Furusato <ic...@gmail.com>.
Not all use cases of JSPWiki involve a container, e.g., we have used it as
an embedded application in several instances, and are also using it running
from a simple Jetty started up from a POM. So removing the caching
functionality from within the application would remove it completely as a
feature for some users. Also, having control over the cache at an
application level is valuable -- not everyone has the ability to alter
application-level configuration in Tomcat as some people are undoubtedly
purchasing space on a server and would rely on admins to set up caching.

Also, I don't see the overhead of the existing (optional) caching
functionality being that high -- apart from the change of cache provider
this doesn't seem like a good reason to remove what is a pretty useful
feature for some people, but YMMV.

Ichiro


On Wed, Sep 18, 2013 at 1:12 PM, Glen Mazza <gl...@gmail.com> wrote:

> Incidentally, I wonder if JSPWiki even needs ehcache.  I was primarily
> interested in switching from oscache to ehcache because the former was
> obsolete, but app-level caching may be redundant today if most app
> servers/servlet containers already take care of it for us.
>
> Glen
>
> On 09/17/2013 03:09 PM, metskem@apache.org wrote:
>
>> Author: metskem
>> Date: Tue Sep 17 19:09:24 2013
>> New Revision: 1524180
>>
>> URL: http://svn.apache.org/r1524180
>> Log:
>> remove caches to (hopefully) make this test more predictable
>>
>> Modified:
>>      jspwiki/trunk/jspwiki-war/src/**test/java/org/apache/wiki/**plugin/*
>> *UndefinedPagesPluginTest.java
>>
>> Modified: jspwiki/trunk/jspwiki-war/src/**test/java/org/apache/wiki/**
>> plugin/**UndefinedPagesPluginTest.java
>> URL: http://svn.apache.org/viewvc/**jspwiki/trunk/jspwiki-war/src/**
>> test/java/org/apache/wiki/**plugin/**UndefinedPagesPluginTest.java?**
>> rev=1524180&r1=1524179&r2=**1524180&view=diff<http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java?rev=1524180&r1=1524179&r2=1524180&view=diff>
>> ==============================**==============================**
>> ==================
>> --- jspwiki/trunk/jspwiki-war/src/**test/java/org/apache/wiki/**plugin/**UndefinedPagesPluginTest.java
>> (original)
>> +++ jspwiki/trunk/jspwiki-war/src/**test/java/org/apache/wiki/**plugin/**UndefinedPagesPluginTest.java
>> Tue Sep 17 19:09:24 2013
>> @@ -25,6 +25,7 @@ import junit.framework.TestCase;
>>   import junit.framework.TestSuite;
>>   import junit.framework.Test;
>>   +import net.sf.ehcache.CacheManager;
>>   import org.apache.wiki.TestEngine;
>>   import org.apache.wiki.WikiContext;
>>   import org.apache.wiki.WikiPage;
>> @@ -46,6 +47,7 @@ public class UndefinedPagesPluginTest ex
>>       public void setUp()
>>           throws Exception
>>       {
>> +        CacheManager.getInstance().**removalAll();
>>           testEngine = new TestEngine(props);
>>             testEngine.saveText( "TestPage", "Reference to [Foobar]." );
>>
>>
>>
>

Re: svn commit: r1524180 - /jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java

Posted by Glen Mazza <gl...@gmail.com>.
Incidentally, I wonder if JSPWiki even needs ehcache.  I was primarily 
interested in switching from oscache to ehcache because the former was 
obsolete, but app-level caching may be redundant today if most app 
servers/servlet containers already take care of it for us.

Glen

On 09/17/2013 03:09 PM, metskem@apache.org wrote:
> Author: metskem
> Date: Tue Sep 17 19:09:24 2013
> New Revision: 1524180
>
> URL: http://svn.apache.org/r1524180
> Log:
> remove caches to (hopefully) make this test more predictable
>
> Modified:
>      jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java
>
> Modified: jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java
> URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java?rev=1524180&r1=1524179&r2=1524180&view=diff
> ==============================================================================
> --- jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java (original)
> +++ jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/UndefinedPagesPluginTest.java Tue Sep 17 19:09:24 2013
> @@ -25,6 +25,7 @@ import junit.framework.TestCase;
>   import junit.framework.TestSuite;
>   import junit.framework.Test;
>   
> +import net.sf.ehcache.CacheManager;
>   import org.apache.wiki.TestEngine;
>   import org.apache.wiki.WikiContext;
>   import org.apache.wiki.WikiPage;
> @@ -46,6 +47,7 @@ public class UndefinedPagesPluginTest ex
>       public void setUp()
>           throws Exception
>       {
> +        CacheManager.getInstance().removalAll();
>           testEngine = new TestEngine(props);
>   
>           testEngine.saveText( "TestPage", "Reference to [Foobar]." );
>
>