hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeag...@apache.org
Subject svn commit: r1582862 - in /hadoop/common/trunk/hadoop-yarn-project: CHANGES.txt hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMAdminService.java
Date Fri, 28 Mar 2014 19:30:08 GMT
Author: jeagles
Date: Fri Mar 28 19:30:08 2014
New Revision: 1582862

URL: http://svn.apache.org/r1582862
Log:
YARN-1883. TestRMAdminService fails due to inconsistent entries in UserGroups (Mit Desai via
jeagles)

Modified:
    hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
    hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMAdminService.java

Modified: hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt?rev=1582862&r1=1582861&r2=1582862&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt Fri Mar 28 19:30:08 2014
@@ -48,6 +48,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 

Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMAdminService.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMAdminService.java?rev=1582862&r1=1582861&r2=1582862&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMAdminService.java
(original)
+++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMAdminService.java
Fri Mar 28 19:30:08 2014
@@ -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");
+    }
   }
 
 }



Mime
View raw message