Skip to content

Commit

Permalink
[ML][TEST] Fix NPE in JobManagerTests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkyle committed Dec 16, 2018
1 parent 95df751 commit cbe9099
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ public MockClientBuilder prepareSearch(String indexName, List<BytesReference> do
when(builder.setIndicesOptions(any())).thenReturn(builder);
when(builder.setQuery(any())).thenReturn(builder);
when(builder.setSource(any())).thenReturn(builder);
when(builder.setSize(anyInt())).thenReturn(builder);
SearchRequest request = new SearchRequest(indexName);
when(builder.request()).thenReturn(request);

Expand Down Expand Up @@ -321,6 +322,7 @@ public MockClientBuilder prepareSearchFields(String indexName, List<Map<String,
when(builder.setIndicesOptions(any())).thenReturn(builder);
when(builder.setQuery(any())).thenReturn(builder);
when(builder.setSource(any())).thenReturn(builder);
when(builder.setSize(anyInt())).thenReturn(builder);
SearchRequest request = new SearchRequest(indexName);
when(builder.request()).thenReturn(request);

Expand Down

0 comments on commit cbe9099

Please sign in to comment.