Skip to content

Commit

Permalink
Sync tests wrt error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed May 14, 2023
1 parent c1b4aad commit d8d4cb6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public void testBigString() throws Exception
fail("expected DatabindException");
} catch (DatabindException e) {
final String message = e.getMessage();
assertTrue("unexpected exception message: " + message, message.startsWith("String length"));
assertTrue("unexpected exception message: " + message, message.contains("exceeds the maximum length ("));
assertTrue("unexpected exception message: " + message, message.startsWith("String value length"));
assertTrue("unexpected exception message: " + message, message.contains("exceeds the maximum allowed ("));
}
}

Expand All @@ -64,8 +64,8 @@ public void testBiggerString() throws Exception
final String message = e.getMessage();
// this test fails when the TextBuffer is being resized, so we don't yet know just how big the string is
// so best not to assert that the String length value in the message is the full 6000000 value
assertTrue("unexpected exception message: " + message, message.startsWith("String length"));
assertTrue("unexpected exception message: " + message, message.contains("exceeds the maximum length ("));
assertTrue("unexpected exception message: " + message, message.startsWith("String value length"));
assertTrue("unexpected exception message: " + message, message.contains("exceeds the maximum allowed ("));
}
}

Expand Down

0 comments on commit d8d4cb6

Please sign in to comment.