[TEST] Enhance failure message when bulk updates have failures

This commit is contained in:
Lee Hinman 2018-08-03 15:25:48 -06:00
parent b99aa81fe4
commit 1e4751ec47
1 changed files with 1 additions and 1 deletions

View File

@ -402,7 +402,7 @@ public class BulkWithUpdatesIT extends ESIntegTestCase {
.setScript(new Script(ScriptType.INLINE, CustomScriptPlugin.NAME, "ctx.op = \"delete\"", Collections.emptyMap()))); .setScript(new Script(ScriptType.INLINE, CustomScriptPlugin.NAME, "ctx.op = \"delete\"", Collections.emptyMap())));
} }
response = builder.execute().actionGet(); response = builder.execute().actionGet();
assertThat(response.hasFailures(), equalTo(false)); assertThat("expected no failures but got: " + response.buildFailureMessage(), response.hasFailures(), equalTo(false));
assertThat(response.getItems().length, equalTo(numDocs)); assertThat(response.getItems().length, equalTo(numDocs));
for (int i = 0; i < numDocs; i++) { for (int i = 0; i < numDocs; i++) {
assertThat(response.getItems()[i].getItemId(), equalTo(i)); assertThat(response.getItems()[i].getItemId(), equalTo(i));