HADOOP-7290. Unit test failure in TestUserGroupInformation.testGetServerSideGroups. Contributed by Trevor Robison
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1102893 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a8a336b1b5
commit
a7bf585727
@ -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
|
||||
|
@ -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<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 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 =
|
||||
|
Loading…
Reference in New Issue
Block a user