Ticket #6018 (closed defect: fixed)

Bug contains 3 commit(s) | SVN Diffs for #6018

 

Opened 2 years ago

Last modified 1 year ago

TestDateFormatRelative fails on 5 Nov 2007

Reported by: andy Assigned to: srl
Priority: critical Milestone: 3.9.2
Component: formatting Version: Current
Keywords: Cc:
Load: Xref:
Java Version: Operating System:
Project (C/J): all Weeks: 0.2
Review: yoshito

Description

Intltest failure, first seen on Nov 5, 2007. Was passing last week.

        case 7:: format:  output!=expectStr, got [\u0412][\u0447][\u0435][\u0440][\u0430] expected [\u041F][\u043E][\u0437][\u0430][\u0432][\u0447][\u0435][\u0440][\u0430]

      ---ERRORS (1) in TestFormatRelative
   ---ERRORS (1) in DataDrivenFormatTest
...


--------------------------------------
Errors in total: 1.
            TestFormatRelative
         DataDrivenFormatTest
      format

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

Stock ICU 3.8. Failure seen on Linux and Mac. Haven't tried Windows.

Attachments

Change History

11/05/07 14:58:16 changed by grhoten

  • owner changed from somebody to srl.
  • priority changed from assess to major.
  • weeks set to 0.2.
  • project changed from ICU4C to all.
  • milestone changed from UNSCH to 4.0.

11/05/07 15:00:16 changed by grhoten

  • owner changed from srl to yoshito.

01/03/08 17:12:02 changed by srl

  • owner changed from yoshito to srl.

01/03/08 17:18:42 changed by srl

  • status changed from new to assigned.

OK, a number of problems here.

  • The test was trying to add/subtract multiples of 86400000 milliseconds to the current time to get "today", "tomorrow", "day before yesterday" etc. This doesn't work around DST changes, such as happened on 4th Nov 2007
  • the test has been changed to have an "add" type of semantic - simply add or subtract a day from the calendar
  • this uncovered a bug in the underlying relative calculations - it would consider from 9pm one day to 9am the next day to be "Today" because it used the fieldDifference() API. This seemed like a good idea at the time, but it fails because subtracting 1 day from "tomorrow 9am" becomes "today 9am" which is before "today 9pm" and thus the difference calculation stops, thinking that it has overshot. I have changed the implementation to simply take the difference between the target date's modified julian day and today's modified julian day. This will result in a scalar number of days that is negative for prior days, positive for future days, and zero for today - all day.

01/03/08 17:21:48 changed by srl

  • revw set to yoshito.

Also some calendar debug code was updated.

01/04/08 08:51:27 changed by yoshito

  • revw deleted.

We need to update ICU4J code to support "RELATIVE_ADD:DATE=x". I move it back to un-reviewed and Steven will update the Java code.

01/04/08 12:34:01 changed by srl

  • priority changed from major to critical.
  • milestone changed from 4.0 to 3.9.2.

01/04/08 17:07:25 changed by srl

  • revw set to yoshito.

fixed for J

updated C test

01/09/08 11:12:25 changed by yoshito

  • status changed from assigned to closed.
  • resolution set to fixed.

11/03/08 08:29:33 changed by anonymous

---OK: rbnf

---OK: TestEnglishSpelloutRT ---OK: TestDurationsRT ---OK: TestSpanishSpelloutRT ---OK: TestFrenchSpelloutRT ---OK: TestSwissFrenchSpelloutRT ---OK: TestItalianSpelloutRT ---OK: TestGermanSpelloutRT ---OK: TestSwedishSpelloutRT ---OK: TestDutchSpelloutRT ---OK: TestJapaneseSpelloutRT ---OK: TestRussianSpelloutRT ---OK: TestPortugueseSpelloutRT

---OK: rbnfrt

---OK: testAPI_One ---OK: testAPI_Two ---OK: testRBF ---OK: testNotification ---OK: testLocale ---OK: testWrapFactory ---OK: testCoverage

---OK: icuserv

---OK: TestToASCII ---OK: TestToUnicode ---OK: TestIDNToASCII ---OK: TestIDNToUnicode ---OK: TestCompare ---OK: TestErrorCases ---OK: TestChaining ---OK: TestRootLabelSeparator ---OK: TestCompareReferenceImpl ---OK: TestDataFile ---OK: TestRefIDNA ---OK: TestIDNAMonkeyTest

---OK: Test

---OK: TestConformanceTestVectors

---OK: idna

---OK: TestToUnicode ---OK: TestFromUnicode ---OK: TestGetUnicodeSet

---OK: convert

---OK: TestParse

---OK: rbnfp

---OK: ConstructionTest ---OK: UTF8Test ---OK: UTF16Test ---OK: C1BytesTest ---OK: InputFilterTest ---OK: DetectionTest

---OK: csdet


Errors in total: 1.

TestFormatRelative

DataDrivenFormatTest

format


Elapsed Time: 00:03:52.000 *** Error code 1

Stop in /usr/ports/devel/icu. *** Error code 1

Stop in /usr/ports/devel/glib20. *** Error code 1

Stop in /usr/ports/devel/glib20.


Add/Change #6018 (TestDateFormatRelative fails on 5 Nov 2007)




Anti spam check: