[
https://issues.apache.org/jira/browse/NIFI-6509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16915417#comment-16915417
]
ASF subversion and git services commented on NIFI-6509:
-------------------------------------------------------
Commit 3de81d618ea45bd6cf26c33ccabf94b561733d67 in nifi's branch
refs/heads/master from Tamas Palfy
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=3de81d6 ]
NIFI-6509 - Date related issue in unit test
VolatileComponentStatusRepositoryTest
As NIFI-6508 has already solved the original issue, turned this PR into a
refactor within in the affected Test class.
This closes #3621.
Signed-off-by: Koji Kawamura <[email protected]>
> 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
> Time Spent: 0.5h
> 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)