twalthr commented on a change in pull request #7932:  [FLINK-11727][formats] 
Fixed JSON format issues after serialization 
URL: https://github.com/apache/flink/pull/7932#discussion_r266424918
 
 

 ##########
 File path: 
flink-formats/flink-json/src/test/java/org/apache/flink/formats/json/JsonRowSerializationSchemaTest.java
 ##########
 @@ -157,17 +175,12 @@ public void testSchema() throws IOException {
                nestedRow.setField(1, BigDecimal.valueOf(12));
                row.setField(10, nestedRow);
 
-               final Row resultRow = serializeAndDeserialize(rowSchema, row);
-               assertEquals(row, resultRow);
-       }
-
-       // 
--------------------------------------------------------------------------------------------
-
-       private Row serializeAndDeserialize(TypeInformation<Row> rowSchema, Row 
row) throws IOException {
                final JsonRowSerializationSchema serializationSchema = new 
JsonRowSerializationSchema(rowSchema);
                final JsonRowDeserializationSchema deserializationSchema = new 
JsonRowDeserializationSchema(rowSchema);
 
-               final byte[] bytes = serializationSchema.serialize(row);
-               return deserializationSchema.deserialize(bytes);
+               assertThat(row, whenSerializedWith(serializationSchema)
 
 Review comment:
   very nice matcher, reads fluently :)

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


With regards,
Apache Git Services

Reply via email to