jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1569986 - /jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/TestEngine.java
Date Wed, 19 Feb 2014 23:51:31 GMT
Author: juanpablo
Date: Wed Feb 19 23:51:31 2014
New Revision: 1569986

URL: http://svn.apache.org/r1569986
Log:
[JSPWIKI-821] TestEngine sometimes creates testrepositories with double timestamps after r1567444

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

Modified: jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/TestEngine.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/TestEngine.java?rev=1569986&r1=1569985&r2=1569986&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/TestEngine.java (original)
+++ jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/TestEngine.java Wed Feb 19 23:51:31
2014
@@ -34,6 +34,7 @@ import net.sourceforge.stripes.mock.Mock
 import net.sourceforge.stripes.mock.MockHttpSession;
 import net.sourceforge.stripes.mock.MockServletContext;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.apache.wiki.api.exceptions.ProviderException;
 import org.apache.wiki.api.exceptions.WikiException;
@@ -407,9 +408,10 @@ public class TestEngine extends WikiEngi
      */
     private static Properties cleanTestProps( Properties props )
     {
+        String pageDir = props.getProperty( "jspwiki.fileSystemProvider.pageDir" );
         props.put( AuthenticationManager.PROP_LOGIN_THROTTLING, "false" );
         props.setProperty( "jspwiki.fileSystemProvider.pageDir", 
-                           props.getProperty( "jspwiki.fileSystemProvider.pageDir" ) + System.currentTimeMillis()
);
+                           pageDir.replaceAll( "\\d", StringUtils.EMPTY ) + System.currentTimeMillis()
);
         return props;
     }
 



Mime
View raw message