Hadoop Common
  1. Hadoop Common
  2. HADOOP-7389

Use of TestingGroups by tests causes subsequent tests to fail

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.0
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      As mentioned in HADOOP-6671, UserGroupInformation.createUserForTesting(...) manipulates static state which can cause test cases which are run after a call to this function to fail.

      1. hadoop-7389.1.patch
        5 kB
        Aaron T. Myers
      2. hadoop-7389.0.patch
        5 kB
        Aaron T. Myers
      3. HADOOP-6527-branch-1-win_UGI_fix(2).patch
        7 kB
        Ivan Mitic

        Issue Links

          Activity

          Hide
          Ivan Mitic added a comment -

          Attaching branch-1-win compatible patch. Would it be possible for someone to do the port.

          Thanks!

          Show
          Ivan Mitic added a comment - Attaching branch-1-win compatible patch. Would it be possible for someone to do the port. Thanks!
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-maven #17 (See https://builds.apache.org/job/Hadoop-Common-trunk-maven/17/)
          HADOOP-7389. Use of TestingGroups by tests causes subsequent tests to fail. Contributed by Aaron T. Myers.

          tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1135820
          Files :

          • /hadoop/common/trunk/common/CHANGES.txt
          • /hadoop/common/trunk/common/src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java
          • /hadoop/common/trunk/common/src/java/org/apache/hadoop/security/UserGroupInformation.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-maven #17 (See https://builds.apache.org/job/Hadoop-Common-trunk-maven/17/ ) HADOOP-7389 . Use of TestingGroups by tests causes subsequent tests to fail. Contributed by Aaron T. Myers. tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1135820 Files : /hadoop/common/trunk/common/CHANGES.txt /hadoop/common/trunk/common/src/test/core/org/apache/hadoop/security/TestUserGroupInformation.java /hadoop/common/trunk/common/src/java/org/apache/hadoop/security/UserGroupInformation.java
          Hide
          Tom White added a comment -

          I've just committed this. Thanks, Aaron.

          Show
          Tom White added a comment - I've just committed this. Thanks, Aaron.
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12482516/hadoop-7389.1.patch
          against trunk revision 1135333.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 3 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 system test framework. The patch passed system test framework compile.

          Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/624//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/624//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/624//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12482516/hadoop-7389.1.patch against trunk revision 1135333. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/624//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/624//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/624//console This message is automatically generated.
          Hide
          Aaron T. Myers added a comment -

          Updated patch addressing Todd's comments.

          Show
          Aaron T. Myers added a comment - Updated patch addressing Todd's comments.
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12482503/hadoop-7389.0.patch
          against trunk revision 1135333.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 3 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 system test framework. The patch passed system test framework compile.

          Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/622//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/622//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/622//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12482503/hadoop-7389.0.patch against trunk revision 1135333. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/622//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/622//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/622//console This message is automatically generated.
          Hide
          Todd Lipcon added a comment -

          well, if the underlying implementation returned null, then it would be a bug, right? In which case this behavior would be masking the bug in the underlying implementation.

          Show
          Todd Lipcon added a comment - well, if the underlying implementation returned null, then it would be a bug, right? In which case this behavior would be masking the bug in the underlying implementation.
          Hide
          Aaron T. Myers added a comment -

          I don't think we need the following code anymore:

          Perhaps, but only incidentally so because the underlying implementations of the Groups interface happen to do this themselves.

          I can remove it if you want, but it seems like leaving it in will only potentially be helpful.

          Show
          Aaron T. Myers added a comment - I don't think we need the following code anymore: Perhaps, but only incidentally so because the underlying implementations of the Groups interface happen to do this themselves. I can remove it if you want, but it seems like leaving it in will only potentially be helpful.
          Hide
          Todd Lipcon added a comment -

          oh, now I understand: reordering the tests makes it fail. Then, fixing UGI makes it pass again.

          Show
          Todd Lipcon added a comment - oh, now I understand: reordering the tests makes it fail. Then, fixing UGI makes it pass again.
          Hide
          Todd Lipcon added a comment -

          I don't think we need the following code anymore:

                 if (result == null) {
                   result = new ArrayList<String>();
                 }
          

          right?

          Also, any reason that you've relocated the testLogin method?

          Show
          Todd Lipcon added a comment - I don't think we need the following code anymore: if (result == null ) { result = new ArrayList< String >(); } right? Also, any reason that you've relocated the testLogin method?
          Hide
          Aaron T. Myers added a comment -

          The only thing I changed in TestUserGroupInformation.java was to change the order of the test cases. Without the corresponding change to UserGroupInformation.java, this modified test fails.

          Show
          Aaron T. Myers added a comment - The only thing I changed in TestUserGroupInformation.java was to change the order of the test cases. Without the corresponding change to UserGroupInformation.java , this modified test fails.

            People

            • Assignee:
              Aaron T. Myers
              Reporter:
              Aaron T. Myers
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development