Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2241

Fix Jsr310/Joda tests when comparing datetimes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.8.2
    • 1.9.0
    • java
    • None

    Description

      Whe comparing Instant, DateTime, LocalTime with its Joda equivalents the tests fail since the java.time.* adds support for microseconds, and Joda only miliseconds. For example:

      Failed tests:
      TestSpecificLogicalTypes.testAbilityToReadJodaRecordWrittenAsJsr310Record:183
      Expected: is "11:45:07.170331"
      but: was "11:45:07.170"
      TestSpecificLogicalTypes.testRecordWithJsr310LogicalTypes:115 Should match written record expected:<

      {"b": true, "i32": 34, "i64": 35, "f32": 3.14, "f64": 3019.34, "s": null, "d": 2018-10-11, "t": 11:45:06.513252, "ts": 2018-10-11T11:45:06.513358Z, "dec": 123.45}

      > but was:<

      {"b": true, "i32": 34, "i64": 35, "f32": 3.14, "f64": 3019.34, "s": null, "d": 2018-10-11, "t": 11:45:06.513, "ts": 2018-10-11T11:45:06.513Z, "dec": 123.45}

      >

      Attachments

        Issue Links

          Activity

            People

              fokko Fokko Driesprong
              fokko Fokko Driesprong
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: