Copilot commented on code in PR #8362:
URL: https://github.com/apache/hbase/pull/8362#discussion_r3420696903
##########
pom.xml:
##########
@@ -2761,6 +2761,14 @@
<reason>Use junit5 instead</reason>
<bannedImports>
<bannedImport>junit.framework.**</bannedImport>
+ <bannedImport>org.junit.*</bannedImport>
+ <bannedImport>org.junit.rules.**</bannedImport>
+ <bannedImport>org.junit.runner.**</bannedImport>
+ <bannedImport>org.junit.runners.**</bannedImport>
+ <bannedImport>org.junit.experimental.**</bannedImport>
Review Comment:
This rule is configured with <includeTestCode>true</includeTestCode>, so it
will also ban JUnit4 imports in src/test. The codebase still has at least one
JUnit5 test using JUnit4 static assertions (e.g.,
hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestSnapshotInfo.java
imports static org.junit.Assert.*), so this change will cause the enforcer
step to fail unless tests are updated in the same PR. If the intent is to
disallow these imports only in production sources (per PR title), set
includeTestCode to false for this rule.
--
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]