You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2012/11/17 20:54:36 UTC

svn commit: r1410770 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/valves/TestAccessLogValve.java webapps/docs/changelog.xml

Author: rjung
Date: Sat Nov 17 19:54:35 2012
New Revision: 1410770

URL: http://svn.apache.org/viewvc?rev=1410770&view=rev
Log:
Fix time zone formatting in ALV test.
Test failed in non-GMT time zone.

Backport of r1410763 and r1410766 from trunk.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1410763,1410766

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java?rev=1410770&r1=1410769&r2=1410770&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestAccessLogValve.java Sat Nov 17 19:54:35 2012
@@ -34,7 +34,7 @@ public class TestAccessLogValve {
         final int cacheSize = 10;
 
         SimpleDateFormat sdf =
-                new SimpleDateFormat("dd/MMM/yyyy:HH:mm:ss", Locale.US);
+                new SimpleDateFormat("[dd/MMM/yyyy:HH:mm:ss Z]", Locale.US);
         sdf.setTimeZone(TimeZone.getDefault());
 
         AccessLogValve.DateFormatCache dfc =
@@ -89,6 +89,6 @@ public class TestAccessLogValve {
     }
 
     private String generateExpected(SimpleDateFormat sdf, long secs) {
-        return "[" + sdf.format(new Date(secs * 1000)) + " +0000]";
+        return sdf.format(new Date(secs * 1000));
     }
 }

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1410770&r1=1410769&r2=1410770&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat Nov 17 19:54:35 2012
@@ -53,6 +53,15 @@
   They eventually become mixed with the numbered issues. (I.e., numbered
   issues to not "pop up" wrt. others).
 -->
+<section name="Tomcat 7.0.34 (markt)">
+  <subsection name="Catalina">
+    <changelog>
+      <fix>
+        Fix unit test for AccessLogValve when using non-GMT time zone. (rjung)
+      </fix>
+    </changelog>
+  </subsection>
+</section>
 <section name="Tomcat 7.0.33 (markt)">
   <subsection name="Catalina">
     <changelog>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org