exceptionfactory commented on a change in pull request #5304:
URL: https://github.com/apache/nifi/pull/5304#discussion_r687818449
##########
File path: nifi-mock/pom.xml
##########
@@ -66,8 +66,8 @@
<dependency>
<!-- Dependency marked as compile, not test, because we have
assertion
methods in our MockSession & MockFlowFile -->
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
Review comment:
To be more precise in dependency declarations, this should be
`junit-jupiter-api` instead of `junit-jupiter-engine`.
```suggestion
<artifactId>junit-jupiter-api</artifactId>
```
##########
File path: pom.xml
##########
@@ -267,10 +267,21 @@
</dependency>
<!-- These junit/mockito/groovy/spock/hamcrest dependencies are
here to encourage consistent unit test library usage -->
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <version>5.7.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <version>5.7.2</version>
+ </dependency>
Review comment:
We should leverage the JUnit Bill-of-Materials dependency to declare the
version once and ensure consistency.
```suggestion
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.7.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
```
##########
File path:
nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/test/java/org/apache/nifi/processors/graph/TestExecuteGraphQuery.java
##########
@@ -41,9 +41,10 @@
public class TestExecuteGraphQuery {
protected TestRunner runner;
- @Rule public MockitoRule mockitoRule = MockitoJUnit.rule();
+ @Rule
+ public MockitoRule mockitoRule = MockitoJUnit.rule();
Review comment:
The `@Rule` annotation is a JUnit 4 feature that is implemented
differently in JUnit 5. In this particular test class, it looks like the
annotation and the `MockitoRule` variable can be removed
##########
File path: pom.xml
##########
@@ -455,8 +466,13 @@
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
Review comment:
The `junit-jupiter-api` should also be declared as a direct dependency
in addition to the engines.
```suggestion
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifiactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]