This is an automated email from the ASF dual-hosted git repository.

liuxiaocs7 pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.5 by this push:
     new 0bd15bcebfa HBASE-30227 Disallow JUnit4 imports in source code (#8362)
0bd15bcebfa is described below

commit 0bd15bcebfaf27dd1e0426025c24e9a8f8a4f8e4
Author: Xiao Liu <[email protected]>
AuthorDate: Wed Jun 17 20:07:11 2026 +0800

    HBASE-30227 Disallow JUnit4 imports in source code (#8362)
    
    Signed-off-by: Wellington Chevreuil <[email protected]>
    Signed-off-by: Duo Zhang <[email protected]>
    Signed-off-by: Peng Lu <[email protected]>
---
 pom.xml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pom.xml b/pom.xml
index 9c5e413c134..45a7c2c79eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2444,7 +2444,14 @@
                   <reason>Use junit5 instead</reason>
                   <bannedImports>
                     <bannedImport>junit.framework.**</bannedImport>
+                    <bannedImport>org.junit.**</bannedImport>
+                    <bannedImport>static org.junit.Assert.**</bannedImport>
+                    <bannedImport>static org.junit.Assume.**</bannedImport>
                   </bannedImports>
+                  <allowedImports>
+                    <allowedImport>org.junit.jupiter.**</allowedImport>
+                    <allowedImport>org.junit.platform.**</allowedImport>
+                  </allowedImports>
                 </restrictImports>
               </rules>
             </configuration>

Reply via email to