diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestGroupsCaching.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestGroupsCaching.java index 4c471da4e8c..46e9f922585 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestGroupsCaching.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestGroupsCaching.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -66,7 +67,7 @@ public class TestGroupsCaching { public static class FakeGroupMapping extends ShellBasedUnixGroupsMapping { // any to n mapping - private static Set allGroups = new HashSet(); + private static Set allGroups = new LinkedHashSet(); private static Set blackList = new HashSet(); private static int requestCount = 0; private static long getGroupsDelayMs = 0;