Wellington Chevreuil created HBASE-26662: --------------------------------------------
Summary: User.createUserForTesting should not reset UserProvider.groups every time if hbase.group.service.for.test.only is true Key: HBASE-26662 URL: https://issues.apache.org/jira/browse/HBASE-26662 Project: HBase Issue Type: Bug Reporter: Wellington Chevreuil Assignee: Wellington Chevreuil The _if check_ below will always unnecessarily reset static var _UserProvider.groups_ to a newly created instance of TestingGroups every time `User.createUserForTesting` is called. {noformat} if (!(UserProvider.groups instanceof TestingGroups) || conf.getBoolean(TestingGroups.TEST_CONF, false)) { UserProvider.groups = new TestingGroups(UserProvider.groups); } {noformat} For tests creating multiple {_}test users{_}, this causes the latest created user to reset _groups_ and all previously created users would now have to be available on the {_}User.underlyingImplementation{_}, which not always will be true. -- This message was sent by Atlassian Jira (v8.20.1#820001)