HDFS-10738. Fix TestRefreshUserMappings.testRefreshSuperUserGroupsConfiguration test failure. Contributed by Rakesh R.
(cherry picked from commit 0f701f433d
)
This commit is contained in:
parent
47293d951f
commit
7f1879abe6
|
@ -151,8 +151,12 @@ public class TestRefreshUserMappings {
|
|||
@Test
|
||||
public void testRefreshSuperUserGroupsConfiguration() throws Exception {
|
||||
final String SUPER_USER = "super_user";
|
||||
final String [] GROUP_NAMES1 = new String [] {"gr1" , "gr2"};
|
||||
final String [] GROUP_NAMES2 = new String [] {"gr3" , "gr4"};
|
||||
final List<String> groupNames1 = new ArrayList<>();
|
||||
groupNames1.add("gr1");
|
||||
groupNames1.add("gr2");
|
||||
final List<String> groupNames2 = new ArrayList<>();
|
||||
groupNames2.add("gr3");
|
||||
groupNames2.add("gr4");
|
||||
|
||||
//keys in conf
|
||||
String userKeyGroups = DefaultImpersonationProvider.getTestProvider().
|
||||
|
@ -180,8 +184,8 @@ public class TestRefreshUserMappings {
|
|||
when(ugi2.getUserName()).thenReturn("userL2");
|
||||
|
||||
// set groups for users
|
||||
when(ugi1.getGroupNames()).thenReturn(GROUP_NAMES1);
|
||||
when(ugi2.getGroupNames()).thenReturn(GROUP_NAMES2);
|
||||
when(ugi1.getGroups()).thenReturn(groupNames1);
|
||||
when(ugi2.getGroups()).thenReturn(groupNames2);
|
||||
|
||||
|
||||
// check before
|
||||
|
|
Loading…
Reference in New Issue