On 17.11.2012 18:53, Rainer Jung wrote: > Currently the ALV tests fail for me because of a hard coded timezone in > the test. We can either copy some logic from ALV into the test class, or > make the private static method getTimeZone(() protected and call it from > the test class. A patch for the latter approach is available at: > > http://people.apache.org/~rjung/patches/test-alv-timezone.patch > > If we wanted to copy in, the code basically boils down to > > timezone = TimeZone.getDefault(); > if (timezone.inDaylightTime(date)) { > int offset = timezone.getDSTSavings(); > return calculateTimeZoneOffset(timezone.getRawOffset() + offset); > } else { > return calculateTimeZoneOffset(timezone.getRawOffset()); > } > > and calculateTimeZoneOffset() is another 20 lines private static method > that formats the timezone offset. > > I'd go with making the getTimeZone(() method protected. Of course we > then do not test the timezone formatting code, only the caching, like we > do now.
Rubbish. Failure fixed in a simpler way by r1410763. Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org