Skip to content

Commit

Permalink
[TEST] Fix GetUserPrivilegesResponse#Indices(StreamInput) constr
Browse files Browse the repository at this point in the history
  • Loading branch information
albertzaharovits committed Oct 19, 2018
1 parent 7b49beb commit aeb3cda
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 aeb3cda

Please sign in to comment.