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
Conversation
@exceptionfactory got time to do a review? |
There was a problem hiding this 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.
...ry-service/src/test/java/org/apache/nifi/schemaregistry/services/TestAvroSchemaRegistry.java
Outdated
Show resolved
Hide resolved
...es-action-handler-service/src/test/java/org/apache/nifi/rules/handlers/TestAlertHandler.java
Outdated
Show resolved
Hide resolved
...es-action-handler-service/src/test/java/org/apache/nifi/rules/handlers/TestAlertHandler.java
Outdated
Show resolved
Hide resolved
...es-action-handler-service/src/test/java/org/apache/nifi/rules/handlers/TestAlertHandler.java
Outdated
Show resolved
Hide resolved
...es-action-handler-service/src/test/java/org/apache/nifi/rules/handlers/TestAlertHandler.java
Outdated
Show resolved
Hide resolved
...ripting-processors/src/test/java/org/apache/nifi/processors/script/TestInvokeJavascript.java
Outdated
Show resolved
Hide resolved
...ripting-processors/src/test/java/org/apache/nifi/processors/script/TestInvokeJavascript.java
Outdated
Show resolved
Hide resolved
...ripting-processors/src/test/java/org/apache/nifi/processors/script/TestInvokeJavascript.java
Outdated
Show resolved
Hide resolved
...rocessors/src/test/java/org/apache/nifi/rules/handlers/script/ScriptedActionHandlerTest.java
Outdated
Show resolved
Hide resolved
...rocessors/src/test/java/org/apache/nifi/rules/handlers/script/ScriptedActionHandlerTest.java
Outdated
Show resolved
Hide resolved
@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. |
@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. |
There was a problem hiding this 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.
...es-action-handler-service/src/test/java/org/apache/nifi/rules/handlers/TestAlertHandler.java
Outdated
Show resolved
Hide resolved
...tion-handler-service/src/test/java/org/apache/nifi/rules/handlers/TestExpressionHandler.java
Outdated
Show resolved
Hide resolved
...ules-action-handler-service/src/test/java/org/apache/nifi/rules/handlers/TestLogHandler.java
Outdated
Show resolved
Hide resolved
...tion-handler-service/src/test/java/org/apache/nifi/rules/handlers/TestRecordSinkHandler.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
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>
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:
mvn -Pcontrib-check clean install
at the rootnifi
folder?LICENSE
file, including the mainLICENSE
file undernifi-assembly
?NOTICE
file, including the mainNOTICE
file found undernifi-assembly
?.displayName
in addition to .name (programmatic access) for each of the new properties?For documentation related changes:
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.