Fix reindex test when log level is debug

When log level is debug we'd dereference null because the test
was being cute and cutting corners.

Relates to #25256
This commit is contained in:
Nik Everett 2017-06-20 16:06:58 -04:00
parent 1f14d042f6
commit 8d9a08e239
1 changed files with 2 additions and 3 deletions

View File

@ -566,12 +566,11 @@ public class AsyncBulkByScrollActionTests extends ESTestCase {
} }
public void testCancelBeforeSendBulkRequest() throws Exception { public void testCancelBeforeSendBulkRequest() throws Exception {
// We bail so early we don't need to pass in a half way valid response. cancelTaskCase((DummyAsyncBulkByScrollAction action) ->
cancelTaskCase((DummyAsyncBulkByScrollAction action) -> action.sendBulkRequest(timeValueNanos(System.nanoTime()), null)); action.sendBulkRequest(timeValueNanos(System.nanoTime()), new BulkRequest()));
} }
public void testCancelBeforeOnBulkResponse() throws Exception { public void testCancelBeforeOnBulkResponse() throws Exception {
// We bail so early we don't need to pass in a half way valid response.
cancelTaskCase((DummyAsyncBulkByScrollAction action) -> cancelTaskCase((DummyAsyncBulkByScrollAction action) ->
action.onBulkResponse(timeValueNanos(System.nanoTime()), new BulkResponse(new BulkItemResponse[0], 0))); action.onBulkResponse(timeValueNanos(System.nanoTime()), new BulkResponse(new BulkItemResponse[0], 0)));
} }