HADOOP-16847. Test can fail if HashSet iterates in a different order.

Contributed by Testfixer
This commit is contained in:
testfixer 2020-02-11 05:22:07 -06:00 committed by GitHub
parent d5467d299d
commit d36cd37e60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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<String> allGroups = new HashSet<String>();
private static Set<String> allGroups = new LinkedHashSet<String>();
private static Set<String> blackList = new HashSet<String>();
private static int requestCount = 0;
private static long getGroupsDelayMs = 0;