Skip to content

Commit e3e42df

Browse files
committed
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 <elserj@apache.org> Signrd-off-by: Duo Zhang <zhangduo@apache.org>
1 parent f1dd865 commit e3e42df

File tree

1 file changed

+1
-2
lines changed
  • hbase-common/src/main/java/org/apache/hadoop/hbase/security

1 file changed

+1
-2
lines changed

hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,7 @@ public <T> T runAs(PrivilegedExceptionAction<T> action)
351351
public static User createUserForTesting(Configuration conf,
352352
String name, String[] groups) {
353353
synchronized (UserProvider.class) {
354-
if (!(UserProvider.groups instanceof TestingGroups) ||
355-
conf.getBoolean(TestingGroups.TEST_CONF, false)) {
354+
if (!(UserProvider.groups instanceof TestingGroups)) {
356355
UserProvider.groups = new TestingGroups(UserProvider.groups);
357356
}
358357
}

0 commit comments

Comments
 (0)