You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Nathan Beyer <nd...@apache.org> on 2007/03/11 20:10:36 UTC

[classlib] Should tests.api.java.util.GregorianCalendarTest be excluded

I'm seeing a consistent failure for this unit test on WinXP and
Win2000 on the IBM VM. Should this test be excluded or at least the
method disabled?

test_getI	Failure	expected:<346> but was:<345>

-Nathan

Re: [classlib] Should tests.api.java.util.GregorianCalendarTest be excluded

Posted by Nathan Beyer <nd...@apache.org>.
Great, thanks. I've applied the patch.

On 3/14/07, Tony Wu <wu...@gmail.com> wrote:
> Thanks Nathan,
> I think I got the point :)
>
> the date "Dec 24 00:00:01 GMT 2000" is Dec 23 for people in the west
> (GMT-1 to GMT-12) whereas we have entered Dec 24 in China(GMT+8),
> Russia(GMT+3) and UK(GMT).
>
> I have uploaded a patch on Harmony-2959 which has been reopened.
>
> On 3/15/07, Nathan Beyer <nd...@apache.org> wrote:
> > I apologize for the delay response, I've been a little busy lately.
> >
> > I ran the test on Sun JRE 5 Update 11 and Sun JRE 6 and this bit of
> > the getI test failed as well.
> >        // Regression test for Hamrony-2959
> >        Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
> >        GregorianCalendar gc = new GregorianCalendar();
> >        gc.setGregorianChange(date);
> >        gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
> >        assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));
> >
> > The failure was exactly the same.
> >
> > junit.framework.AssertionFailedError: expected:<346> but was:<345>
> >
> > I tried running the [1] snippet below, but I had to change
> > 'Calendar.Date' to 'Calendar.DATE'. I presume this was just a quick
> > typo. The output of this when I run it on the same Sun JREs as
> > mentioned above is 23.
> >
> > -Nathan
> >
> > On 3/12/07, Tony Wu <wu...@gmail.com> wrote:
> > > Hi Nathan,
> > > This testcase passes on my winxp sp2 and ubuntu with ibm vme, besides
> > > our build system on debian. I can not reproduce it and IIRC there is
> > > no DST in Dec and Jan. Could you pls help me to verify whether it
> > > passes on RI and the output of code[1] and the testcase[2].  Thanks a
> > > lot.
> > >
> > > [1]
> > >
> > > Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
> > > GregorianCalendar gc = new GregorianCalendar();
> > > gc.setGregorianChange(date);
> > > gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
> > > System.out.println(gc.get(Calendar.Date));
> > >
> > > [2]
> > >
> > > Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
> > > GregorianCalendar gc = new GregorianCalendar();
> > > gc.setGregorianChange(date);
> > > gc.setTimeInMillis(Date.parse("Dec 24 12:00:01 GMT 2000"));
> > > System.out.println(gc.get(Calendar.Date));
> > > assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));
> > >
> > >
> > > On 3/12/07, Nathan Beyer <nd...@apache.org> wrote:
> > > > I hope not.
> > > >
> > > > According to my Win2K builds, this test has failed since 3/7 through
> > > > today, so it seems to consistently fail.
> > > >
> > > > -Nathan
> > > >
> > > > On 3/11/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > > > > Heh - did we have some problem w/ DST?
> > > > >
> > > > > geir
> > > > >
> > > > > On Mar 11, 2007, at 3:10 PM, Nathan Beyer wrote:
> > > > >
> > > > > > I'm seeing a consistent failure for this unit test on WinXP and
> > > > > > Win2000 on the IBM VM. Should this test be excluded or at least the
> > > > > > method disabled?
> > > > > >
> > > > > > test_getI     Failure expected:<346> but was:<345>
> > > > > >
> > > > > > -Nathan
> > > > >
> > > > >
> > > >
> > >
> > >
> > > --
> > > Tony Wu
> > > China Software Development Lab, IBM
> > >
> >
>
>
> --
> Tony Wu
> China Software Development Lab, IBM
>

Re: [classlib] Should tests.api.java.util.GregorianCalendarTest be excluded

Posted by Tony Wu <wu...@gmail.com>.
Thanks Nathan,
I think I got the point :)

the date "Dec 24 00:00:01 GMT 2000" is Dec 23 for people in the west
(GMT-1 to GMT-12) whereas we have entered Dec 24 in China(GMT+8),
Russia(GMT+3) and UK(GMT).

I have uploaded a patch on Harmony-2959 which has been reopened.

On 3/15/07, Nathan Beyer <nd...@apache.org> wrote:
> I apologize for the delay response, I've been a little busy lately.
>
> I ran the test on Sun JRE 5 Update 11 and Sun JRE 6 and this bit of
> the getI test failed as well.
>        // Regression test for Hamrony-2959
>        Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
>        GregorianCalendar gc = new GregorianCalendar();
>        gc.setGregorianChange(date);
>        gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
>        assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));
>
> The failure was exactly the same.
>
> junit.framework.AssertionFailedError: expected:<346> but was:<345>
>
> I tried running the [1] snippet below, but I had to change
> 'Calendar.Date' to 'Calendar.DATE'. I presume this was just a quick
> typo. The output of this when I run it on the same Sun JREs as
> mentioned above is 23.
>
> -Nathan
>
> On 3/12/07, Tony Wu <wu...@gmail.com> wrote:
> > Hi Nathan,
> > This testcase passes on my winxp sp2 and ubuntu with ibm vme, besides
> > our build system on debian. I can not reproduce it and IIRC there is
> > no DST in Dec and Jan. Could you pls help me to verify whether it
> > passes on RI and the output of code[1] and the testcase[2].  Thanks a
> > lot.
> >
> > [1]
> >
> > Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
> > GregorianCalendar gc = new GregorianCalendar();
> > gc.setGregorianChange(date);
> > gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
> > System.out.println(gc.get(Calendar.Date));
> >
> > [2]
> >
> > Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
> > GregorianCalendar gc = new GregorianCalendar();
> > gc.setGregorianChange(date);
> > gc.setTimeInMillis(Date.parse("Dec 24 12:00:01 GMT 2000"));
> > System.out.println(gc.get(Calendar.Date));
> > assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));
> >
> >
> > On 3/12/07, Nathan Beyer <nd...@apache.org> wrote:
> > > I hope not.
> > >
> > > According to my Win2K builds, this test has failed since 3/7 through
> > > today, so it seems to consistently fail.
> > >
> > > -Nathan
> > >
> > > On 3/11/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > > > Heh - did we have some problem w/ DST?
> > > >
> > > > geir
> > > >
> > > > On Mar 11, 2007, at 3:10 PM, Nathan Beyer wrote:
> > > >
> > > > > I'm seeing a consistent failure for this unit test on WinXP and
> > > > > Win2000 on the IBM VM. Should this test be excluded or at least the
> > > > > method disabled?
> > > > >
> > > > > test_getI     Failure expected:<346> but was:<345>
> > > > >
> > > > > -Nathan
> > > >
> > > >
> > >
> >
> >
> > --
> > Tony Wu
> > China Software Development Lab, IBM
> >
>


-- 
Tony Wu
China Software Development Lab, IBM

Re: [classlib] Should tests.api.java.util.GregorianCalendarTest be excluded

Posted by Nathan Beyer <nd...@apache.org>.
All test runs were in an environment where the default time zone was
GMT or GMT+x.

Also there could have been tests that had a side-effect of setting the
default time zone which were run before this test and something
changed the order of execution.

-Nathan


On 3/15/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>
> On Mar 14, 2007, at 5:35 PM, Nathan Beyer wrote:
>
> > I apologize for the delay response, I've been a little busy lately.
>
> Hey, we all are.
>
> >
> > I ran the test on Sun JRE 5 Update 11 and Sun JRE 6 and this bit of
> > the getI test failed as well.
> >        // Regression test for Hamrony-2959
> >        Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
> >        GregorianCalendar gc = new GregorianCalendar();
> >        gc.setGregorianChange(date);
> >        gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
> >        assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));
> >
> > The failure was exactly the same.
> >
> > junit.framework.AssertionFailedError: expected:<346> but was:<345>
> >
> > I tried running the [1] snippet below, but I had to change
> > 'Calendar.Date' to 'Calendar.DATE'. I presume this was just a quick
> > typo. The output of this when I run it on the same Sun JREs as
> > mentioned above is 23.
>
>
> Any idea why it used to work?
>
> geir
>
> >
> > -Nathan
> >
> > On 3/12/07, Tony Wu <wu...@gmail.com> wrote:
> >> Hi Nathan,
> >> This testcase passes on my winxp sp2 and ubuntu with ibm vme, besides
> >> our build system on debian. I can not reproduce it and IIRC there is
> >> no DST in Dec and Jan. Could you pls help me to verify whether it
> >> passes on RI and the output of code[1] and the testcase[2].  Thanks a
> >> lot.
> >>
> >> [1]
> >>
> >> Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
> >> GregorianCalendar gc = new GregorianCalendar();
> >> gc.setGregorianChange(date);
> >> gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
> >> System.out.println(gc.get(Calendar.Date));
> >>
> >> [2]
> >>
> >> Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
> >> GregorianCalendar gc = new GregorianCalendar();
> >> gc.setGregorianChange(date);
> >> gc.setTimeInMillis(Date.parse("Dec 24 12:00:01 GMT 2000"));
> >> System.out.println(gc.get(Calendar.Date));
> >> assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));
> >>
> >>
> >> On 3/12/07, Nathan Beyer <nd...@apache.org> wrote:
> >> > I hope not.
> >> >
> >> > According to my Win2K builds, this test has failed since 3/7
> >> through
> >> > today, so it seems to consistently fail.
> >> >
> >> > -Nathan
> >> >
> >> > On 3/11/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> >> > > Heh - did we have some problem w/ DST?
> >> > >
> >> > > geir
> >> > >
> >> > > On Mar 11, 2007, at 3:10 PM, Nathan Beyer wrote:
> >> > >
> >> > > > I'm seeing a consistent failure for this unit test on WinXP and
> >> > > > Win2000 on the IBM VM. Should this test be excluded or at
> >> least the
> >> > > > method disabled?
> >> > > >
> >> > > > test_getI     Failure expected:<346> but was:<345>
> >> > > >
> >> > > > -Nathan
> >> > >
> >> > >
> >> >
> >>
> >>
> >> --
> >> Tony Wu
> >> China Software Development Lab, IBM
> >>
>
>

Re: [classlib] Should tests.api.java.util.GregorianCalendarTest be excluded

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
On Mar 14, 2007, at 5:35 PM, Nathan Beyer wrote:

> I apologize for the delay response, I've been a little busy lately.

Hey, we all are.

>
> I ran the test on Sun JRE 5 Update 11 and Sun JRE 6 and this bit of
> the getI test failed as well.
>        // Regression test for Hamrony-2959
>        Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
>        GregorianCalendar gc = new GregorianCalendar();
>        gc.setGregorianChange(date);
>        gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
>        assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));
>
> The failure was exactly the same.
>
> junit.framework.AssertionFailedError: expected:<346> but was:<345>
>
> I tried running the [1] snippet below, but I had to change
> 'Calendar.Date' to 'Calendar.DATE'. I presume this was just a quick
> typo. The output of this when I run it on the same Sun JREs as
> mentioned above is 23.


Any idea why it used to work?

geir

>
> -Nathan
>
> On 3/12/07, Tony Wu <wu...@gmail.com> wrote:
>> Hi Nathan,
>> This testcase passes on my winxp sp2 and ubuntu with ibm vme, besides
>> our build system on debian. I can not reproduce it and IIRC there is
>> no DST in Dec and Jan. Could you pls help me to verify whether it
>> passes on RI and the output of code[1] and the testcase[2].  Thanks a
>> lot.
>>
>> [1]
>>
>> Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
>> GregorianCalendar gc = new GregorianCalendar();
>> gc.setGregorianChange(date);
>> gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
>> System.out.println(gc.get(Calendar.Date));
>>
>> [2]
>>
>> Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
>> GregorianCalendar gc = new GregorianCalendar();
>> gc.setGregorianChange(date);
>> gc.setTimeInMillis(Date.parse("Dec 24 12:00:01 GMT 2000"));
>> System.out.println(gc.get(Calendar.Date));
>> assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));
>>
>>
>> On 3/12/07, Nathan Beyer <nd...@apache.org> wrote:
>> > I hope not.
>> >
>> > According to my Win2K builds, this test has failed since 3/7  
>> through
>> > today, so it seems to consistently fail.
>> >
>> > -Nathan
>> >
>> > On 3/11/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>> > > Heh - did we have some problem w/ DST?
>> > >
>> > > geir
>> > >
>> > > On Mar 11, 2007, at 3:10 PM, Nathan Beyer wrote:
>> > >
>> > > > I'm seeing a consistent failure for this unit test on WinXP and
>> > > > Win2000 on the IBM VM. Should this test be excluded or at  
>> least the
>> > > > method disabled?
>> > > >
>> > > > test_getI     Failure expected:<346> but was:<345>
>> > > >
>> > > > -Nathan
>> > >
>> > >
>> >
>>
>>
>> --
>> Tony Wu
>> China Software Development Lab, IBM
>>


Re: [classlib] Should tests.api.java.util.GregorianCalendarTest be excluded

Posted by Nathan Beyer <nd...@apache.org>.
I apologize for the delay response, I've been a little busy lately.

I ran the test on Sun JRE 5 Update 11 and Sun JRE 6 and this bit of
the getI test failed as well.
        // Regression test for Hamrony-2959
        Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
        GregorianCalendar gc = new GregorianCalendar();
        gc.setGregorianChange(date);
        gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
        assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));

The failure was exactly the same.

junit.framework.AssertionFailedError: expected:<346> but was:<345>

I tried running the [1] snippet below, but I had to change
'Calendar.Date' to 'Calendar.DATE'. I presume this was just a quick
typo. The output of this when I run it on the same Sun JREs as
mentioned above is 23.

-Nathan

On 3/12/07, Tony Wu <wu...@gmail.com> wrote:
> Hi Nathan,
> This testcase passes on my winxp sp2 and ubuntu with ibm vme, besides
> our build system on debian. I can not reproduce it and IIRC there is
> no DST in Dec and Jan. Could you pls help me to verify whether it
> passes on RI and the output of code[1] and the testcase[2].  Thanks a
> lot.
>
> [1]
>
> Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
> GregorianCalendar gc = new GregorianCalendar();
> gc.setGregorianChange(date);
> gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
> System.out.println(gc.get(Calendar.Date));
>
> [2]
>
> Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
> GregorianCalendar gc = new GregorianCalendar();
> gc.setGregorianChange(date);
> gc.setTimeInMillis(Date.parse("Dec 24 12:00:01 GMT 2000"));
> System.out.println(gc.get(Calendar.Date));
> assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));
>
>
> On 3/12/07, Nathan Beyer <nd...@apache.org> wrote:
> > I hope not.
> >
> > According to my Win2K builds, this test has failed since 3/7 through
> > today, so it seems to consistently fail.
> >
> > -Nathan
> >
> > On 3/11/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > > Heh - did we have some problem w/ DST?
> > >
> > > geir
> > >
> > > On Mar 11, 2007, at 3:10 PM, Nathan Beyer wrote:
> > >
> > > > I'm seeing a consistent failure for this unit test on WinXP and
> > > > Win2000 on the IBM VM. Should this test be excluded or at least the
> > > > method disabled?
> > > >
> > > > test_getI     Failure expected:<346> but was:<345>
> > > >
> > > > -Nathan
> > >
> > >
> >
>
>
> --
> Tony Wu
> China Software Development Lab, IBM
>

Re: [classlib] Should tests.api.java.util.GregorianCalendarTest be excluded

Posted by Tony Wu <wu...@gmail.com>.
Hi Nathan,
This testcase passes on my winxp sp2 and ubuntu with ibm vme, besides
our build system on debian. I can not reproduce it and IIRC there is
no DST in Dec and Jan. Could you pls help me to verify whether it
passes on RI and the output of code[1] and the testcase[2].  Thanks a
lot.

[1]

Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
GregorianCalendar gc = new GregorianCalendar();
gc.setGregorianChange(date);
gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
System.out.println(gc.get(Calendar.Date));

[2]

Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
GregorianCalendar gc = new GregorianCalendar();
gc.setGregorianChange(date);
gc.setTimeInMillis(Date.parse("Dec 24 12:00:01 GMT 2000"));
System.out.println(gc.get(Calendar.Date));
assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));


On 3/12/07, Nathan Beyer <nd...@apache.org> wrote:
> I hope not.
>
> According to my Win2K builds, this test has failed since 3/7 through
> today, so it seems to consistently fail.
>
> -Nathan
>
> On 3/11/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > Heh - did we have some problem w/ DST?
> >
> > geir
> >
> > On Mar 11, 2007, at 3:10 PM, Nathan Beyer wrote:
> >
> > > I'm seeing a consistent failure for this unit test on WinXP and
> > > Win2000 on the IBM VM. Should this test be excluded or at least the
> > > method disabled?
> > >
> > > test_getI     Failure expected:<346> but was:<345>
> > >
> > > -Nathan
> >
> >
>


-- 
Tony Wu
China Software Development Lab, IBM

Re: [classlib] Should tests.api.java.util.GregorianCalendarTest be excluded

Posted by Nathan Beyer <nd...@apache.org>.
I hope not.

According to my Win2K builds, this test has failed since 3/7 through
today, so it seems to consistently fail.

-Nathan

On 3/11/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> Heh - did we have some problem w/ DST?
>
> geir
>
> On Mar 11, 2007, at 3:10 PM, Nathan Beyer wrote:
>
> > I'm seeing a consistent failure for this unit test on WinXP and
> > Win2000 on the IBM VM. Should this test be excluded or at least the
> > method disabled?
> >
> > test_getI     Failure expected:<346> but was:<345>
> >
> > -Nathan
>
>

Re: [classlib] Should tests.api.java.util.GregorianCalendarTest be excluded

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
Heh - did we have some problem w/ DST?

geir

On Mar 11, 2007, at 3:10 PM, Nathan Beyer wrote:

> I'm seeing a consistent failure for this unit test on WinXP and
> Win2000 on the IBM VM. Should this test be excluded or at least the
> method disabled?
>
> test_getI	Failure	expected:<346> but was:<345>
>
> -Nathan