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 bba81522a41..69455684d31 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; @@ -67,7 +68,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;