Skip to content

Commit

Permalink
Fix SliceBuilderTests#testRandom failures
Browse files Browse the repository at this point in the history
Add missing shard context creation in a random test.
  • Loading branch information
jimczi committed Apr 26, 2018
1 parent eb1b9df commit 62851cf
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ public void testToFilterRandom() throws IOException {
for (int i = 0; i < numSlices; i++) {
for (int j = 0; j < numShards; j++) {
SliceBuilder slice = new SliceBuilder("_id", i, numSlices);
context = createShardContext(Version.CURRENT, reader, "_id", DocValuesType.SORTED, numShards, j);
Query q = slice.toFilter(null, createRequest(j), context, Version.CURRENT);
if (i == j) {
assertThat(q, instanceOf(MatchAllDocsQuery.class));
Expand Down

0 comments on commit 62851cf

Please sign in to comment.