kbendick commented on code in PR #4636:
URL: https://github.com/apache/iceberg/pull/4636#discussion_r859319292
##########
core/src/test/java/org/apache/iceberg/rest/responses/TestCreateNamespaceResponse.java:
##########
@@ -101,7 +101,8 @@ public void testDeserializeInvalidResponse() {
String jsonMisspelledKeys =
"{\"namepsace\":[\"accounting\",\"tax\"],\"propertiezzzz\":{\"owner\":\"Hank\"}}";
AssertHelpers.assertThrows(
"A JSON response with the keys spelled incorrectly should fail to
deserialize and validate",
- JsonProcessingException.class,
+ IllegalArgumentException.class,
+ "Invalid namespace: null",
Review Comment:
Because `RESTObjectMapper` will ignore unknown fields, the exception thrown
in these tests where the keys are misspelled turn out to be more specific.
I've updated them to use the proper thrown exception type, as well as add
part of the exception message to help clarify the tests purpose and intent.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]