Skip to content

Commit cecddfe

Browse files
authored
HADOOP-19691. [JDK17] Disallow JUnit4 Imports After JUnit5 Migration. (#7976) Contributed by Shilun Fan.
* HADOOP-19691. [JDK17] Disallow JUnit4 Imports After JUnit5 Migration. Reviewed-by: Chris Nauroth <[email protected]> Signed-off-by: Shilun Fan <[email protected]>
1 parent a7dabfb commit cecddfe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,17 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
322322
<bannedImport>org.apache.commons.logging.**</bannedImport>
323323
</bannedImports>
324324
</restrictImports>
325+
<restrictImports>
326+
<includeTestCode>true</includeTestCode>
327+
<reason>Use JUnit5</reason>
328+
<bannedImports>
329+
<bannedImport>org.junit.**</bannedImport>
330+
</bannedImports>
331+
<allowedImports>
332+
<allowedImport>org.junit.jupiter.**</allowedImport>
333+
<allowedImport>org.junit.platform.**</allowedImport>
334+
</allowedImports>
335+
</restrictImports>
325336
</rules>
326337
</configuration>
327338
</execution>

0 commit comments

Comments
 (0)