Igal Shilman created FLINK-11753:
------------------------------------

             Summary: Add utils for serialization compatibility tests
                 Key: FLINK-11753
                 URL: https://issues.apache.org/jira/browse/FLINK-11753
             Project: Flink
          Issue Type: Improvement
            Reporter: Igal Shilman
            Assignee: Igal Shilman


It would be helpful to have few hamcrest matchers, and stub-serializer/snapshot 
classes to ease
unit testing serializer schema related logic.
This is currently implemented in few different places already, in different 
ways.
For example:
 * 
[https://github.com/apache/flink/blob/master/flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/typeutils/AvroSerializerSnapshotTest.java#L192]
 * 
[https://github.com/apache/flink/blob/master/flink-core/src/test/java/org/apache/flink/api/common/typeutils/base/EnumSerializerSnapshotMigrationTest.java#L74]
 * 
[https://github.com/apache/flink/blob/1850193b956b899aefd3ea84fe726e10b9359b55/flink-core/src/test/java/org/apache/flink/api/common/typeutils/TypeSerializerSnapshotMigrationTestBase.java#L533]

A stub serializer, is a serializer that returns a stub snapshot, which can be 
configured during test setup how to behave when 
restoreSerializer/resolveSchemaCompatibility are called.
This would be very useful for tests that test composite serializers.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to