hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1102893 - in /hadoop/common/trunk: CHANGES.txt src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java
Date Fri, 13 May 2011 20:44:33 GMT
Author: eli
Date: Fri May 13 20:44:32 2011
New Revision: 1102893

URL: http://svn.apache.org/viewvc?rev=1102893&view=rev
Log:
HADOOP-7290. Unit test failure in TestUserGroupInformation.testGetServerSideGroups. Contributed
by Trevor Robison

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=1102893&r1=1102892&r2=1102893&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Fri May 13 20:44:32 2011
@@ -214,6 +214,8 @@ Trunk (unreleased changes)
     HADOOP-7268. FileContext.getLocalFSFileContext() behavior needs to be fixed
     w.r.t tokens. (jitendra)
 
+    HADOOP-7290. Unit test failure in TestUserGroupInformation.testGetServerSideGroups. (Trevor
Robison via eli)
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java?rev=1102893&r1=1102892&r2=1102893&view=diff
==============================================================================
--- hadoop/common/trunk/src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java
(original)
+++ hadoop/common/trunk/src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java
Fri May 13 20:44:32 2011
@@ -24,9 +24,9 @@ import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.security.PrivilegedExceptionAction;
-import java.util.ArrayList;
 import java.util.Collection;
-import java.util.List;
+import java.util.LinkedHashSet;
+import java.util.Set;
 
 import javax.security.auth.Subject;
 import javax.security.auth.login.AppConfigurationEntry;
@@ -81,7 +81,7 @@ public class TestUserGroupInformation {
     String line = br.readLine();
     System.out.println(userName + ":" + line);
    
-    List<String> groups = new ArrayList<String> ();    
+    Set<String> groups = new LinkedHashSet<String> ();    
     for(String s: line.split("[\\s]")) {
       groups.add(s);
     }
@@ -91,7 +91,7 @@ public class TestUserGroupInformation {
     String[] gi = login.getGroupNames();
     assertEquals(groups.size(), gi.length);
     for(int i=0; i < gi.length; i++) {
-      assertEquals(groups.get(i), gi[i]);
+      assertTrue(groups.contains(gi[i]));
     }
     
     final UserGroupInformation fakeUser = 



Mime
View raw message