[
https://issues.apache.org/jira/browse/NIFI-6509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Koji Kawamura resolved NIFI-6509.
---------------------------------
Fix Version/s: 1.10.0
Resolution: Fixed
> Date related issue in unit test VolatileComponentStatusRepositoryTest
> ---------------------------------------------------------------------
>
> Key: NIFI-6509
> URL: https://issues.apache.org/jira/browse/NIFI-6509
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Tamas Palfy
> Assignee: Tamas Palfy
> Priority: Minor
> Fix For: 1.10.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Unit test
> {{VolatileComponentStatusRepositoryTest.testFilterDatesUsingPreferredDataPoints}}
> may fail with the following:
> {code:java}
> java.lang.AssertionError:
> Expected :Thu Jan 01 00:00:00 CET 1970
> Actual :Thu Jan 01 01:00:00 CET 1970
> {code}
> The test creates a {{VolatileComponentStatusRepository}} instance and adds
> {{java.util.Date}} objects to it starting from epoch (via {{new Date(0)}}).
> This first date at epoch is the _Actual_ in the _AssertionError_.
> Then filters this list by looking for those that are earlier or matching a
> _start_ paramater. This _start_ is created from a {{LocalDateTime}} at the
> default system time zone.
> This is the _Expected_ in the _AssertionError_.
> In general the issue is the difference in how the list is created (dates that
> are 00:00:00 GMT) and how the filter parameter date is created (00:00:00 at
> system time zone).
--
This message was sent by Atlassian Jira
(v8.3.2#803003)