Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-10581

TestUserGroupInformation#testGetServerSideGroups fails because groups stored in Set and ArrayList are compared

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.1, 3.0.0-alpha1
    • Fix Version/s: 2.5.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The test fails on some machines that has variety of user groups.
      Initially the groups are extracted and stored in a set
      Set<String> groups = new LinkedHashSet<String> ();
      when the user groups are collected by calling the login.getGroupNames(), they are stored in an array list
      String[] gi = login.getGroupNames();
      Because these groups are stored in different structure, there will be inconsistency in the group count. Sets have unique list of keys while array list emits everything they have.
      assertEquals(groups.size(), gi.length); fails when there are more than one groups with same name as the count in sets will be less than the arraylist.

        Attachments

        1. HADOOP-10581.patch
          1 kB
          Mit Desai
        2. HADOOP-10581.patch
          1 kB
          Mit Desai
        3. HADOOP-10581.patch
          2 kB
          Mit Desai

          Activity

            People

            • Assignee:
              mitdesai Mit Desai
              Reporter:
              mitdesai Mit Desai
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: