Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6-rc-1
-
Fix Version/s: 1.6-rc-3
-
Component/s: None
-
Labels:None
-
Environment:HideAMD4200+ under Linux, Fedora 8
$ java -version
java version "1.6.0_12-ea"
Java(TM) SE Runtime Environment (build 1.6.0_12-ea-b02)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)
$
$ uname -a
Linux jupiter 2.6.26.6-49.fc8 #1 SMP Fri Oct 17 15:33:32 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
$
ShowAMD4200+ under Linux, Fedora 8 $ java -version java version "1.6.0_12-ea" Java(TM) SE Runtime Environment (build 1.6.0_12-ea-b02) Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode) $ $ uname -a Linux jupiter 2.6.26.6-49.fc8 #1 SMP Fri Oct 17 15:33:32 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux $
-
Number of attachments :2
Description
ran
ant install
got "BUILD FAILED"
-
- build.xml
- 27/Dec/08 3:49 AM
- 46 kB
- Gavin Charles Flower
-
- groovey_failures.txt
- 26/Dec/08 3:54 PM
- 12 kB
- Gavin Charles Flower
Activity
[...]
[junit] Running UberTestCaseGroovySourceSubPackages
[junit] expected:<5353200000> but was:<5356800000>)
[junit] Tests run: 722, Failures: 1, Errors: 0, Time elapsed: 30.433 sec
[junit] Test UberTestCaseGroovySourceSubPackages FAILED
[...]
/bulk/gcf/updates/Java/groovy/groovy-1.6-RC-1/build.xml:455: Test failed, not processing further targets.
[...]
I should have mentioned that I had changed the build.xml file so that in each "<javac" task the target was now "1.6", rather than "1.5".
build.xml actually used, note that I think I only changed the target to be "1.6" in the javac tasks.
Gavin, this is not helping. look at the generated html reports and click on the failing test. There you can see the error message and the test case. Also it would be good to know if the error still appears for you if you use 1.5
Hopefully this is more useful...
Testcase: testDurationArithmetic took 0.022 sec
FAILED
Two months absolute duration should be the same as the difference between two dates two months apart
expected:<5353200000> but was:<5356800000>
junit.framework.AssertionFailedError: Two months absolute duration should be the same as the difference between two dates two months apart
expected:<5353200000> but was:<5356800000>
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:361)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:158)
at groovy.time.DurationTest$_testDurationArithmetic_closure3.doCall(DurationTest.groovy:38)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:150)
at groovy.time.DurationTest$_testDurationArithmetic_closure3.doCall(DurationTest.groovy)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at groovy.lang.Closure.call(Closure.java:279)
at groovy.lang.Closure.call(Closure.java:274)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:92)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.access$200(GroovyCategorySupport.java:60)
at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:190)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.use(DefaultGroovyMethods.java:331)
at org.codehaus.groovy.runtime.dgm$567.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:307)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at groovy.time.DurationTest.testDurationArithmetic(DurationTest.groovy:27)
Testcase: testDatumDependantArithmetic took 0.003 sec
I redid the build with jdk 1.5 as follows:
I unzipped to a fresh directory
I made no changes to build.xml
set Java 1.5.0_17-b04 as the default
and reran
ant install
got the same error, different values
Testcase: testDurationArithmetic took 0.024 sec
FAILED
Two months absolute duration should be the same as the difference between two dates two months apart
expected:<5094000000> but was:<5097600000>
junit.framework.AssertionFailedError: Two months absolute duration should be the same as the difference between two dates two months apart
expected:<5094000000> but was:<5097600000>
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:361)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:158)
at groovy.time.DurationTest$_testDurationArithmetic_closure3.doCall(DurationTest.groovy:38)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:150)
at groovy.time.DurationTest$_testDurationArithmetic_closure3.doCall(DurationTest.groovy)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at groovy.lang.Closure.call(Closure.java:279)
at groovy.lang.Closure.call(Closure.java:274)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:92)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.access$200(GroovyCategorySupport.java:60)
at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:190)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.use(DefaultGroovyMethods.java:331)
at org.codehaus.groovy.runtime.dgm$567.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:307)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at groovy.time.DurationTest.testDurationArithmetic(DurationTest.groovy:27)
Testcase: testDatumDependantArithmetic took 0.003 sec
Out by exactly an hour. Looks like a daylight saving issue.
What timezone is your system using? Is it EDT as per the uname?
$ uname -a
Linux jupiter 2.6.26.6-49.fc8 #1 SMP Fri Oct 17 15:33:32 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
$
I think the 'EDT' in the above line refers to when the kernel was compiled by the Fedora team.
The system clock is GMT.
User time is New Zealand Summer Time.
groovy-1.6-RC-2
Fedora 10, with latest updates
$ java -version
java version "1.6.0_12-ea"
Java(TM) SE Runtime Environment (build 1.6.0_12-ea-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)
Same error.
JUnit test results >>>>
A week and a month absolute duration should be the same as the difference between two dates that far apart expected:<3279600000> but was:<3283200000>
junit.framework.AssertionFailedError: A week and a month absolute duration should be the same as the difference between two dates that far apart
expected:<3279600000> but was:<3283200000>
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:361)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:158)
at groovy.time.DurationTest$_testDurationArithmetic_closure3.doCall(DurationTest.groovy:49)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:150)
at groovy.time.DurationTest$_testDurationArithmetic_closure3.doCall(DurationTest.groovy)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at groovy.lang.Closure.call(Closure.java:279)
at groovy.lang.Closure.call(Closure.java:274)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:92)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.access$200(GroovyCategorySupport.java:60)
at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:190)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.use(DefaultGroovyMethods.java:324)
at org.codehaus.groovy.runtime.dgm$596.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:307)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at groovy.time.DurationTest.testDurationArithmetic(DurationTest.groovy:27)
reducing the test to the essential parts we have
use(TimeCategory) {
def nowOffset = 0.months.from.now.daylightSavingsOffset
def monthAndWeekA = 1.month + 1.week
offsetA = monthAndWeekA.daylightSavingsOffset - nowOffset
// subtract absolute date and a duration from another absolute date
offsetB = (1.month.from.now + 1.week).daylightSavingsOffset - 0.months.from.now.daylightSavingsOffset
def monthAndWeekB = 1.month.from.now + 1.week + offsetB - 0.months.from.now
assertEquals "A week and a month absolute duration should be the same as the difference between two dates that far apart\n",
(monthAndWeekA + offsetA).toMilliseconds(), monthAndWeekB.toMilliseconds()
}
This test tries to test some daylight saving issues... Maybe it has some wrong assumption...
Gavin, what does this print for you?
import org.codehaus.groovy.runtime.TimeCategory use(TimeCategory) { def d = new Date() println d println d.daylightSavingsOffset }
It should print a date with the timezone and a empty line. If this is not the case, then we have a possible trackfor this issue.
The results I got using RC2, where:
groovy> import org.codehaus.groovy.runtime.TimeCategory
groovy> use(TimeCategory)
Tue Jan 27 19:02:35 NZDT 2009
0.3600000 seconds
Compiled and tested under RC3, with no failures nor errors reported.
Using
$ java -version
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)
$
Though I think the Java version is not directly relevant to this bug.
could you take a look a the test report and give the exact failing message an test case? look into the target directory or this