You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Alessandro D'Armiento (JIRA)" <ji...@apache.org> on 2019/08/03 11:46:00 UTC
[jira] [Commented] (NIFI-6509) Date related issue in unit test
VolatileComponentStatusRepositoryTest
[ https://issues.apache.org/jira/browse/NIFI-6509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16899444#comment-16899444 ]
Alessandro D'Armiento commented on NIFI-6509:
---------------------------------------------
Hello, I am experiencing this issue too,
In particular, it happens to me it fails {code:java} VolatileComponentStatusRepositoryTest.testFilterDatesUsingStartFilter() {code} with:
{panel:title=Error log}
[ERROR] Failures:
[ERROR] VolatileComponentStatusRepositoryTest.testFilterDatesUsingStartFilter:132 expected:<Thu Jan 01 00:00:00 CET 1970> but was:<Thu Jan 01 01:00:00 CET 1970>
{panel}
> 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
> Priority: Minor
> Time Spent: 10m
> 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
(v7.6.14#76016)