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>
This commit is contained in:
parent
f1dd865c35
commit
e3e42df7f2
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue