Author: dkatayev
Date: 2010-07-01 03:13:18 -0400 (Thu, 01 Jul 2010)
New Revision: 2728
Modified:
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/ext/TestCaching.java
Log:
EXOJCR-774 filing
testNotModifiedSince(org.exoplatform.services.jcr.webdav.ext.TestCaching) fixed. The
problem occured when rolling back date.
Modified:
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/ext/TestCaching.java
===================================================================
---
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/ext/TestCaching.java 2010-07-01
06:53:53 UTC (rev 2727)
+++
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/ext/TestCaching.java 2010-07-01
07:13:18 UTC (rev 2728)
@@ -67,8 +67,8 @@
SimpleDateFormat dateFormat = new
SimpleDateFormat(WebDavConst.DateFormat.IF_MODIFIED_SINCE_PATTERN);
Calendar lastModifiedDate = lastModifiedProperty.getDate();
- lastModifiedDate.roll(Calendar.WEEK_OF_MONTH, -1);
- // Rollback If-Modified-Since date a week earlier.
+ lastModifiedDate.roll(Calendar.SECOND, -10);
+ // Rollback If-Modified-Since 10 seconds earlier.
String ifModifiedDate = dateFormat.format(lastModifiedDate.getTime());
MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
@@ -96,11 +96,8 @@
assertEquals(HTTPStatus.NOT_MODIFIED, response.getStatus());
}
- public void _testNotModifiedSinceFRLocale() throws Exception
+ public void _testModifiedSinceLocaleFR() throws Exception
{
- Node contentNode = node.getNode("jcr:content");
- Property lastModifiedProperty =
contentNode.getProperty("jcr:lastModified");
-
SimpleDateFormat sdf = new
SimpleDateFormat(WebDavConst.DateFormat.IF_MODIFIED_SINCE_PATTERN, Locale.FRENCH);
String ifModifiedDate = sdf.format(sdf.getCalendar().getTime());
Show replies by date