featherchen commented on code in PR #3879:
URL: https://github.com/apache/gravitino/pull/3879#discussion_r1663082736
##########
server/src/test/java/com/datastrato/gravitino/server/web/rest/TestMetalakeOperations.java:
##########
@@ -178,6 +183,19 @@ public void testCreateMetalake() {
Assertions.assertEquals(ErrorConstants.ILLEGAL_ARGUMENTS_CODE,
errorResponse.getCode());
Assertions.assertEquals(
IllegalArgumentException.class.getSimpleName(),
errorResponse.getType());
+
+ String req2 =
"{\"names\":\"metalake\",\"comment\":\"comment\",\"properties\":{}}";
Review Comment:
> Could you also verify the other two exception mappers?
We can certainly verify `JsonParseExceptionMapper` with invalid Json request
string with double `{{` such as
`'{{"$names":"system","comment":"comment","properties":{}}'`
However, `JsonProcessingExceptionMapper` is more tricky, in Jersey, only
those `Exception`s do not belong to `JsonMappingException` or
`JsonParseException` would trigger this mapper. For example
`JsonGenerationException`, which is a subclass of `JsonProcessingException`,
occurs when invalid Json writing, but not reading. Therefore it is hard to be
generated by similar testing approach.
--
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]