hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject [27/50] [abbrv] hadoop git commit: HDFS-10738. Fix TestRefreshUserMappings.testRefreshSuperUserGroupsConfiguration test failure. Contributed by Rakesh R.
Date Tue, 09 Aug 2016 22:34:09 GMT
HDFS-10738. Fix TestRefreshUserMappings.testRefreshSuperUserGroupsConfiguration test failure.
Contributed by Rakesh R.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/0f701f43
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/0f701f43
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/0f701f43

Branch: refs/heads/YARN-3368
Commit: 0f701f433dd3be233bf53e856864c82349e8274e
Parents: caf800d
Author: Kihwal Lee <kihwal@apache.org>
Authored: Tue Aug 9 14:54:11 2016 -0500
Committer: Kihwal Lee <kihwal@apache.org>
Committed: Tue Aug 9 14:54:11 2016 -0500

----------------------------------------------------------------------
 .../security/TestRefreshUserMappings.java       | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/0f701f43/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java
index c76033c..ee20a95 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java
@@ -151,9 +151,13 @@ 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().
         getProxySuperuserGroupConfKey(SUPER_USER);
@@ -178,12 +182,12 @@ public class TestRefreshUserMappings {
     
     when(ugi1.getUserName()).thenReturn("userL1");
     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
     try {
       ProxyUsers.authorize(ugi1, "127.0.0.1");


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message