[
https://issues.apache.org/jira/browse/AVRO-2241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16660791#comment-16660791
]
ASF subversion and git services commented on AVRO-2241:
-------------------------------------------------------
Commit d695a50ae56398b7daeac40f9a0bbbd605b68731 in avro's branch
refs/heads/master from [~Fokko]
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=d695a50 ]
AVRO-2241. Fix Jsr310/Joda datetime tests (#346)
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}>
> Fix Jsr310/Joda tests when comparing datetimes
> ----------------------------------------------
>
> Key: AVRO-2241
> URL: https://issues.apache.org/jira/browse/AVRO-2241
> Project: Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.8.2
> Reporter: Fokko Driesprong
> Assignee: Fokko Driesprong
> Priority: Major
> Fix For: 1.9.0
>
>
> 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}>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)