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
c9bcd87b34
commit
4a94cfccc9
|
@ -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