wuchong commented on a change in pull request #12756:
URL: https://github.com/apache/flink/pull/12756#discussion_r451954436



##########
File path: 
flink-formats/flink-json/src/test/java/org/apache/flink/formats/json/JsonRowDataSerDeSchemaTest.java
##########
@@ -502,9 +516,17 @@ private void testParseErrors(TestSpec spec) throws 
Exception {
                        .json("{\"map\":{\"key1\":\"123\", \"key2\":\"abc\"}}")
                        .rowType(ROW(FIELD("map", MAP(STRING(), INT()))))
                        .expect(Row.of(createHashMap("key1", 123, "key2", 
null)))
-                       .expectErrorMessage("Failed to deserialize JSON 
'{\"map\":{\"key1\":\"123\", \"key2\":\"abc\"}}'")
+                       .expectErrorMessage("Failed to deserialize JSON 
'{\"map\":{\"key1\":\"123\", \"key2\":\"abc\"}}'"),
 
+               TestSpec
+                       .json("{\"id\":\"2019-11-12T18:00:12\"}")
+                       .rowType(ROW(FIELD("id", 
TIMESTAMP_WITH_LOCAL_TIME_ZONE(0))))
+                       .expectErrorMessage("Failed to deserialize JSON 
'{\"id\":\"2019-11-12T18:00:12\"}'"),
 
+               TestSpec
+                       .json("{\"id\":\"2019-11-12T18:00:12\"}")
+                       .rowType(ROW(FIELD("id", 
TIMESTAMP_WITH_LOCAL_TIME_ZONE(0))))
+                       .expectErrorMessage("Failed to deserialize JSON 
'{\"id\":\"2019-11-12T18:00:12+0800\"}'")

Review comment:
       You are right. We shouldn't use thrown here. Could you please help to 
remove the `thrown` in this test class? We can use `try catch` instead.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to