YARN-1883. TestRMAdminService fails due to inconsistent entries in UserGroups (Mit Desai via jeagles)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1582865 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a6c405b99f
commit
a467e88ae4
|
@ -33,6 +33,9 @@ Release 2.5.0 - UNRELEASED
|
|||
YARN-1136. Replace junit.framework.Assert with org.junit.Assert (Chen He
|
||||
via jeagles)
|
||||
|
||||
YARN-1883. TestRMAdminService fails due to inconsistent entries in
|
||||
UserGroups (Mit Desai via jeagles)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
|
|
@ -90,6 +90,9 @@ public class TestRMAdminService {
|
|||
fs.delete(tmpDir, true);
|
||||
fs.mkdirs(workingPath);
|
||||
fs.mkdirs(tmpDir);
|
||||
|
||||
// reset the groups to what it default test settings
|
||||
MockUnixGroupsMapping.resetGroups();
|
||||
}
|
||||
|
||||
@After
|
||||
|
@ -785,12 +788,7 @@ public class TestRMAdminService {
|
|||
private static class MockUnixGroupsMapping implements
|
||||
GroupMappingServiceProvider {
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
private static List<String> group = new ArrayList<String>() {{
|
||||
add("test_group_A");
|
||||
add("test_group_B");
|
||||
add("test_group_C");
|
||||
}};
|
||||
private static List<String> group = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
public List<String> getGroups(String user) throws IOException {
|
||||
|
@ -813,6 +811,13 @@ public class TestRMAdminService {
|
|||
group.add("test_group_E");
|
||||
group.add("test_group_F");
|
||||
}
|
||||
|
||||
public static void resetGroups() {
|
||||
group.clear();
|
||||
group.add("test_group_A");
|
||||
group.add("test_group_B");
|
||||
group.add("test_group_C");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue