Skip to content

Commit

Permalink
[TEST] Fix GetUserPrivilegesResponse#Indices(StreamInput) constr
Browse files Browse the repository at this point in the history
Closes #34631
  • Loading branch information
albertzaharovits authored and kcm committed Oct 30, 2018
1 parent ea62c16 commit bb2f02a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ public Indices(Collection<String> indices, Collection<String> privileges,
}

public Indices(StreamInput in) throws IOException {
indices = Collections.unmodifiableSet(in.readSet(StreamInput::readString));
privileges = Collections.unmodifiableSet(in.readSet(StreamInput::readString));
// The use of TreeSet is to provide a consistent order that can be relied upon in tests
indices = Collections.unmodifiableSet(new TreeSet<>(in.readSet(StreamInput::readString)));
privileges = Collections.unmodifiableSet(new TreeSet<>(in.readSet(StreamInput::readString)));
fieldSecurity = Collections.unmodifiableSet(in.readSet(input -> {
final String[] grant = input.readOptionalStringArray();
final String[] exclude = input.readOptionalStringArray();
Expand Down

0 comments on commit bb2f02a

Please sign in to comment.