Procházet zdrojové kódy

HADOOP-9476. Some test cases in TestUserGroupInformation fail if ran after testSetLoginUser. Contributed by Robert Parker.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1511140 13f79535-47bb-0310-9956-ffa450edef68
Kihwal Lee před 11 roky
rodič
revize
bd73d916b2

+ 6 - 1
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestUserGroupInformation.java

@@ -76,7 +76,12 @@ public class TestUserGroupInformation {
     javax.security.auth.login.Configuration.setConfiguration(
         new DummyLoginConfiguration());
   }
-  
+
+  @After
+  public void resetUgi() {
+    UserGroupInformation.setLoginUser(null);
+  }
+
   /** Test login method */
   @Test
   public void testLogin() throws Exception {