You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by wc...@apache.org on 2022/01/18 13:18:43 UTC

[hbase] branch branch-2.4 updated: HBASE-26662 User.createUserForTesting should not reset UserProvider.groups every time if hbase.group.service.for.test.only is true (#4029)

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

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


The following commit(s) were added to refs/heads/branch-2.4 by this push:
     new b38c88b  HBASE-26662 User.createUserForTesting should not reset UserProvider.groups every time if hbase.group.service.for.test.only is true (#4029)
b38c88b is described below

commit b38c88b9d6e91ddb3fcc62cde9692b561fc32dce
Author: Wellington Ramos Chevreuil <wc...@apache.org>
AuthorDate: Tue Jan 18 12:32:27 2022 +0000

    HBASE-26662 User.createUserForTesting should not reset UserProvider.groups every time if hbase.group.service.for.test.only is true (#4029)
    
    Signed-off-by: Josh Elser <el...@apache.org>
    Signrd-off-by: Duo Zhang <zh...@apache.org>
---
 hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
index 97d80ba..f88f65a 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
@@ -351,8 +351,7 @@ public abstract class User {
     public static User createUserForTesting(Configuration conf,
         String name, String[] groups) {
       synchronized (UserProvider.class) {
-        if (!(UserProvider.groups instanceof TestingGroups) ||
-            conf.getBoolean(TestingGroups.TEST_CONF, false)) {
+        if (!(UserProvider.groups instanceof TestingGroups)) {
           UserProvider.groups = new TestingGroups(UserProvider.groups);
         }
       }