Skip to content

NIFI-6509 - Date related issue in unit test VolatileComponentStatusRe…#3621

Closed
tpalfy wants to merge 1 commit intoapache:masterfrom
tpalfy:NIFI-6509
Closed

NIFI-6509 - Date related issue in unit test VolatileComponentStatusRe…#3621
tpalfy wants to merge 1 commit intoapache:masterfrom
tpalfy:NIFI-6509

Conversation

@tpalfy
Copy link
Contributor

@tpalfy tpalfy commented Jul 31, 2019

…positoryTest

VolatileComponentStatusRepositoryTest: In 'createBuffers' adding Date objects to repositories starting from 1970.01.01 00:00:00 local time (instead of GMT) - the same way as the 'start' filter parameters are created in the tests.
Minor refactor (some code duplication elimination in creating the repositories and the testing logic in a couple of unit tests.)

VolatileComponentStatusRepository: filterDates method also used 'new Date(0)' when the start parameter was null. Replaced with 'new Date(Integer.MIN_VALUE)'.
Replaced comment with a fitting annotation (@VisibleForTesting).

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically master)?

  • Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not squash or use --force when pushing to allow for clean monitoring of changes.

For code changes:

  • Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
  • Have you written or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
  • If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
  • If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

@tpalfy tpalfy force-pushed the NIFI-6509 branch 2 times, most recently from 0aef74d to 4870f50 Compare August 5, 2019 12:40
@ijokarumawak
Copy link
Member

Hi @tpalfy, thanks for sending the PR! Another JIRA NIFI-6508 and its patch were submitted before this PR, so I merged NIFI-6508 to address the timezone issue at the test. Please take a look at this commit 00f0f84

I noticed your PR addresses the issue as well as does some refactoring to improve code readability. I like more self-descriptive variable naming like you did in the PR. Now the PR has conflict, if you can address conflict, I'm happy to keep reviewing so that your change can also be merged. Thanks!

…positoryTest

As NIFI-6508 has already solved the original issue, turned this PR into a refactor within in the affected Test class.
@tpalfy
Copy link
Contributor Author

tpalfy commented Aug 21, 2019

Hi @ijokarumawak,
Thanks for the update. I checked NIFI-6508 and kept that solution (mine is more complex and only better in non-existing cases - when we would create timestamps close to epoch at GMT+n).
So only the test class refactor remains in this PR.

@ijokarumawak
Copy link
Member

Thanks for the updates @tpalfy ! The change LGTM, +1. Merging to master!

@asfgit asfgit closed this in 3de81d6 Aug 26, 2019
szaboferee pushed a commit to szaboferee/nifi that referenced this pull request Oct 7, 2019
…positoryTest

As NIFI-6508 has already solved the original issue, turned this PR into a refactor within in the affected Test class.

This closes apache#3621.

Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>
patricker pushed a commit to patricker/nifi that referenced this pull request Jan 22, 2020
…positoryTest

As NIFI-6508 has already solved the original issue, turned this PR into a refactor within in the affected Test class.

This closes apache#3621.

Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants