Skip to content

Commit

Permalink
Change
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Brooks committed Nov 5, 2024
1 parent 9ce7c4a commit 7b9a588
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class BulkRequestParserTests extends ESTestCase {

public void testParserCannotBeReusedAfterFailure() {
BytesArray request = new BytesArray("""
{ "index":{ }, "something": "unexpected" }
{ "invalidaction":{ } }
{}
""");

Expand All @@ -49,7 +49,10 @@ public void testParserCannotBeReusedAfterFailure() {
);

IllegalArgumentException ex = expectThrows(IllegalArgumentException.class, () -> incrementalParser.parse(request, false));
assertEquals("Malformed action/metadata line [1], expected END_OBJECT but found [FIELD_NAME]", ex.getMessage());
assertEquals(
"Malformed action/metadata line [1], expected field [create], [delete], [index] or [update] but found [invalidaction]",
ex.getMessage()
);

BytesArray valid = new BytesArray("""
{ "index":{ "_id": "bar" } }
Expand Down

0 comments on commit 7b9a588

Please sign in to comment.