Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIFI-9146 to NIFI-9148 - 4 bundles refactored for JUnit 5 #5360

Closed
wants to merge 7 commits into from

Conversation

MikeThomsen
Copy link
Contributor

Thank you for submitting a contribution to Apache NiFi.

Please provide a short description of the PR here:

Description of PR

Enables X functionality; fixes bug NIFI-YYYY.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

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 main)?

  • 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?
  • Have you verified that the full build is successful on JDK 8?
  • Have you verified that the full build is successful on JDK 11?
  • 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 GitHub Actions CI for build issues and submit an update to your PR as soon as possible.

@MikeThomsen
Copy link
Contributor Author

@exceptionfactory got time to do a review?

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting together these changes @MikeThomsen. There seems to be a variation of approaches in the changed files, which made it difficult to review. For this PR, I attempted to note every instance of items that should be changed, so there are a number of repeated comments. This highlights the importance of details in this refactor process.

Some of the classes look great: a simple replacement of static imports and a few annotations. Other classes had various problems, including switching from static imports to class-based references, and in some cases fully-qualified class references to the @Test annotation. I also noted a number of test methods that relied on fail() to test exception cases, as opposed to using assertThrows. Unfortunately this reflects the variation in test quality, but this would be the opportunity to address those issues.

@MikeThomsen
Copy link
Contributor Author

@exceptionfactory I started noticing the fully qualified annotation weirdness last night on another branch. I think that's an artifact of the migration tool having issues in some cases. I'll make a note to do a big search and replace through all PRs for that and start on the other issues shortly.

On a different note, you're not available on the reviewers autocomplete. I'm not sure what controls that setting, but you might want to post on nifi-dev so you can be tagged without a comment.

@exceptionfactory
Copy link
Contributor

@exceptionfactory I started noticing the fully qualified annotation weirdness last night on another branch. I think that's an artifact of the migration tool having issues in some cases. I'll make a note to do a big search and replace through all PRs for that and start on the other issues shortly.

On a different note, you're not available on the reviewers autocomplete. I'm not sure what controls that setting, but you might want to post on nifi-dev so you can be tagged without a comment.

Thanks for the reply @MikeThomsen, taking a look through and updating the other PRs would be very helpful. I think the reviewer request might be limited to PMC members.

@MikeThomsen
Copy link
Contributor Author

@exceptionfactory all of the changes should be in now. I'm going to start working on the other PRs to apply the same consistent changes to them.

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this PR @MikeThomsen, it looks much better. Just noted a couple instances of MatcherAssert.assertThat that should be static imports. After making those adjustments, this should be good to go.

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the updates @MikeThomsen, looks good! +1 Merging.

@asfgit asfgit closed this in d702506 Sep 6, 2021
krisztina-zsihovszki pushed a commit to krisztina-zsihovszki/nifi that referenced this pull request Jun 28, 2022
NIFI-9147 Refactored nifi-rules-action-handler-bundle to use JUnit 5.
NIFI-9146 Refactored nifi-riemann-bundle to use JUnit 5.
NIFI-9144 Refactored nifi-registry-bundle to use JUnit 5.

This closes apache#5360

Signed-off-by: David Handermann <exceptionfactory@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
2 participants