Re: Unit test failure in SQLTimeZoneTest

Daniel Dekany <[email protected]> Thu, 14 Aug 2014 00:04:31 +0200
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
That test was broken, only accidentally it was working in my time
zone... Just fixed it on GitHub, and thanks for reporting this!

-- 
Thanks,
 Daniel Dekany


Tuesday, August 12, 2014, 4:26:10 AM, Woonsan Ko wrote:

> Hi,
>
> I see a test failing in SQLTimeZoneTest.java from the latest 2.3-gae
> source with the following assert failure:
>
> $ java -version
> java version "1.7.0_40"
> Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
> Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
>
> $ ant -version
> Apache Ant(TM) version 1.8.2 compiled on June 3 2011
>
> $ ant clean test
> ...
>
> $ cat cat build/junit-reports/TEST-*.SQLTimeZoneTest.txt
> Testsuite: freemarker.core.SQLTimeZoneTest
> Tests run: 10, Failures: 1, Errors: 0, Time elapsed: 0.144 sec
>
> Testcase: testCacheFlushings took 0.066 sec
> Testcase: testWithDefaultTZAndNoUseDefSysForSQL took 0.01 sec
> Testcase: testDateAndTimeBuiltInsHasNoEffect took 0.004 sec
> Testcase: testWithGMT2AndUseDefSysForSQL took 0.005 sec
> Testcase: testWithGMT1AndNoUseDefSysForSQL took 0.006 sec
> Testcase: testWithGMT2AndNoUseDefSysForSQL took 0.005 sec
> Testcase: testFormatUTCFlagHasNoEffect took 0.004 sec
> Testcase: testWithGMT1AndUseDefSysForSQL took 0.005 sec
> Testcase: testChangeSettingInTemplate took 0.006 sec
> Testcase: testWithDefaultTZAndUseDefSysForSQL took 0.008 sec
>         FAILED
> expected:<...12:30:05 2014-07-12T[12:30:05 2014-07-12T12:30:05
> 2014-07-12 12:30:05+02:00 2014-07-12T12:30:05+02:00
> 2014-07-12T12:30:05+02:00
> 2014-07-12+02:00 12:30:05+02:00 2014-07-12T12:30:05+02:00
> 2014-07-12T12:30:05+02:00
> 2014-07-12 12:30:05 2014-07-12T12:30:05+02:00 2014-07-12T12:30:05+02]:00
2014-07-12 12:30...>> but was:<...12:30:05 2014-07-12T[06:30:05
> 2014-07-12T06:30:05
> 2014-07-12 12:30:05+02:00 2014-07-12T06:30:05-04:00
> 2014-07-12T06:30:05-04:00
> 2014-07-12+02:00 12:30:05+02:00 2014-07-12T06:30:05-04:00
> 2014-07-12T06:30:05-04:00
> 2014-07-12 12:30:05 2014-07-12T06:30:05-04:00 2014-07-12T06:30:05-04]:00
2014-07-12 12:30...>>
> junit.framework.AssertionFailedError: expected:<...12:30:05
> 2014-07-12T[12:30:05 2014-07-12T12:30:05
> 2014-07-12 12:30:05+02:00 2014-07-12T12:30:05+02:00
> 2014-07-12T12:30:05+02:00
> 2014-07-12+02:00 12:30:05+02:00 2014-07-12T12:30:05+02:00
> 2014-07-12T12:30:05+02:00
> 2014-07-12 12:30:05 2014-07-12T12:30:05+02:00 2014-07-12T12:30:05+02]:00
2014-07-12 12:30...>> but was:<...12:30:05 2014-07-12T[06:30:05
> 2014-07-12T06:30:05
> 2014-07-12 12:30:05+02:00 2014-07-12T06:30:05-04:00
> 2014-07-12T06:30:05-04:00
> 2014-07-12+02:00 12:30:05+02:00 2014-07-12T06:30:05-04:00
> 2014-07-12T06:30:05-04:00
> 2014-07-12 12:30:05 2014-07-12T06:30:05-04:00 2014-07-12T06:30:05-04]:00
2014-07-12 12:30...>>
>         at
> freemarker.core.TemplateOutputTest.assertOutput(TemplateOutputTest.java:38)
>         at
> freemarker.core.SQLTimeZoneTest.testWithDefaultTZAndUseDefSysForSQL(SQLTimeZoneTest.java:134)
>
> $ date
> Mon Aug 11 22:25:41 EDT 2014
>
>
> Is it a known issue?
>
>
> Regards,
>
> Woonsan
>
>


------------------------------------------------------------------------------