flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] libenchao commented on a change in pull request #12421: [FLINK-18002][json] Correct the behavior for ContainerNode as varchar…
Date Mon, 01 Jun 2020 06:01:30 GMT

libenchao commented on a change in pull request #12421:
URL: https://github.com/apache/flink/pull/12421#discussion_r433055376



##########
File path: flink-formats/flink-json/src/test/java/org/apache/flink/formats/json/JsonRowDataSerDeSchemaTest.java
##########
@@ -375,8 +375,12 @@ private void testParseErrors(TestSpec spec) throws Exception {
 		JsonRowDataDeserializationSchema failingSchema = new JsonRowDataDeserializationSchema(
 			spec.rowType,  new RowDataTypeInfo(spec.rowType), false, false);
 
-		thrown.expectMessage(spec.errorMessage);
-		failingSchema.deserialize(spec.json.getBytes());
+		try {
+			failingSchema.deserialize(spec.json.getBytes());
+			throw new RuntimeException("expecting exception " + spec.errorMessage);
+		} catch (Throwable t) {
+			assertEquals(t.getMessage(), spec.errorMessage);
+		}

Review comment:
       Thanks for the reminder, I've corrected all other misusage in this test.




----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message