diff --git a/CHANGES.txt b/CHANGES.txt index a89bd515fb..dc0ee80861 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 diff --git a/src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java b/src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java index 9c0ef6e249..afc49765ed 100644 --- a/src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java +++ b/src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java @@ -24,9 +24,9 @@ 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 void testGetServerSideGroups() throws IOException, String line = br.readLine(); System.out.println(userName + ":" + line); - List groups = new ArrayList (); + Set groups = new LinkedHashSet (); for(String s: line.split("[\\s]")) { groups.add(s); } @@ -91,7 +91,7 @@ public void testGetServerSideGroups() throws IOException, 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 =