Unit test failure in SQLTimeZoneTest

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Unit test failure in SQLTimeZoneTest

Woonsan Ko
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


--
[hidden email]     www.onehippo.com
Boston - 101 Main Street, Cambridge, MA 02142
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466

------------------------------------------------------------------------------
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unit test failure in SQLTimeZoneTest

Daniel Dekany
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
>
>


------------------------------------------------------------------------------
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unit test failure in SQLTimeZoneTest

Woonsan Ko
Thanks for fixing it quickly!
I've just synchronized my fork and confirmed it working fine now.

Cheers,

Woonsan

On 8/13/14 6:04 PM, Daniel Dekany wrote:
> That test was broken, only accidentally it was working in my time
> zone... Just fixed it on GitHub, and thanks for reporting this!
>


--
[hidden email]     www.onehippo.com
Boston - 101 Main Street, Cambridge, MA 02142
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466

------------------------------------------------------------------------------
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
Loading...