Java Code Examples for org.apache.flink.testutils.migration.SchemaCompatibilityTestingSerializer.SchemaCompatibilityTestingSnapshot#thatIsCompatibleWithNextSerializerAfterMigration()
The following examples show how to use
org.apache.flink.testutils.migration.SchemaCompatibilityTestingSerializer.SchemaCompatibilityTestingSnapshot#thatIsCompatibleWithNextSerializerAfterMigration() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CompositeTypeSerializerUtilTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Test public void testCompatibleAfterMigrationIntermediateCompatibilityResult() { final TypeSerializerSnapshot<?>[] testSerializerSnapshots = new TypeSerializerSnapshot<?>[] { SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterReconfiguration("a"), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterMigration("b"), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializer("c"), }; final TypeSerializer<?>[] testNewSerializers = new TypeSerializer<?>[] { new SchemaCompatibilityTestingSerializer("a"), new SchemaCompatibilityTestingSerializer("b"), new SchemaCompatibilityTestingSerializer("c") }; IntermediateCompatibilityResult<?> intermediateCompatibilityResult = CompositeTypeSerializerUtil.constructIntermediateCompatibilityResult(testNewSerializers, testSerializerSnapshots); assertTrue(intermediateCompatibilityResult.isCompatibleAfterMigration()); assertTrue(intermediateCompatibilityResult.getFinalResult().isCompatibleAfterMigration()); }
Example 2
Source File: CompositeTypeSerializerUtilTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Test public void testIncompatibleIntermediateCompatibilityResult() { final TypeSerializerSnapshot<?>[] testSerializerSnapshots = new TypeSerializerSnapshot<?>[] { SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializer(), SchemaCompatibilityTestingSnapshot.thatIsIncompatibleWithTheNextSerializer(), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterReconfiguration(), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterMigration(), }; final TypeSerializer<?>[] testNewSerializers = new TypeSerializer<?>[] { new SchemaCompatibilityTestingSerializer(), new SchemaCompatibilityTestingSerializer(), new SchemaCompatibilityTestingSerializer(), new SchemaCompatibilityTestingSerializer() }; IntermediateCompatibilityResult<?> intermediateCompatibilityResult = CompositeTypeSerializerUtil.constructIntermediateCompatibilityResult(testNewSerializers, testSerializerSnapshots); assertTrue(intermediateCompatibilityResult.isIncompatible()); assertTrue(intermediateCompatibilityResult.getFinalResult().isIncompatible()); }
Example 3
Source File: CompositeTypeSerializerUtilTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testCompatibleAfterMigrationIntermediateCompatibilityResult() { final TypeSerializerSnapshot<?>[] testSerializerSnapshots = new TypeSerializerSnapshot<?>[] { SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterReconfiguration("a"), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterMigration("b"), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializer("c"), }; final TypeSerializer<?>[] testNewSerializers = new TypeSerializer<?>[] { new SchemaCompatibilityTestingSerializer("a"), new SchemaCompatibilityTestingSerializer("b"), new SchemaCompatibilityTestingSerializer("c") }; IntermediateCompatibilityResult<?> intermediateCompatibilityResult = CompositeTypeSerializerUtil.constructIntermediateCompatibilityResult(testNewSerializers, testSerializerSnapshots); assertTrue(intermediateCompatibilityResult.isCompatibleAfterMigration()); assertTrue(intermediateCompatibilityResult.getFinalResult().isCompatibleAfterMigration()); }
Example 4
Source File: CompositeTypeSerializerUtilTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testIncompatibleIntermediateCompatibilityResult() { final TypeSerializerSnapshot<?>[] testSerializerSnapshots = new TypeSerializerSnapshot<?>[] { SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializer(), SchemaCompatibilityTestingSnapshot.thatIsIncompatibleWithTheNextSerializer(), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterReconfiguration(), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterMigration(), }; final TypeSerializer<?>[] testNewSerializers = new TypeSerializer<?>[] { new SchemaCompatibilityTestingSerializer(), new SchemaCompatibilityTestingSerializer(), new SchemaCompatibilityTestingSerializer(), new SchemaCompatibilityTestingSerializer() }; IntermediateCompatibilityResult<?> intermediateCompatibilityResult = CompositeTypeSerializerUtil.constructIntermediateCompatibilityResult(testNewSerializers, testSerializerSnapshots); assertTrue(intermediateCompatibilityResult.isIncompatible()); assertTrue(intermediateCompatibilityResult.getFinalResult().isIncompatible()); }
Example 5
Source File: CompositeTypeSerializerUtilTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testCompatibleAfterMigrationIntermediateCompatibilityResult() { final TypeSerializerSnapshot<?>[] testSerializerSnapshots = new TypeSerializerSnapshot<?>[] { SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterReconfiguration("a"), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterMigration("b"), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializer("c"), }; final TypeSerializer<?>[] testNewSerializers = new TypeSerializer<?>[] { new SchemaCompatibilityTestingSerializer("a"), new SchemaCompatibilityTestingSerializer("b"), new SchemaCompatibilityTestingSerializer("c") }; IntermediateCompatibilityResult<?> intermediateCompatibilityResult = CompositeTypeSerializerUtil.constructIntermediateCompatibilityResult(testNewSerializers, testSerializerSnapshots); assertTrue(intermediateCompatibilityResult.isCompatibleAfterMigration()); assertTrue(intermediateCompatibilityResult.getFinalResult().isCompatibleAfterMigration()); }
Example 6
Source File: CompositeTypeSerializerUtilTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testIncompatibleIntermediateCompatibilityResult() { final TypeSerializerSnapshot<?>[] testSerializerSnapshots = new TypeSerializerSnapshot<?>[] { SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializer(), SchemaCompatibilityTestingSnapshot.thatIsIncompatibleWithTheNextSerializer(), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterReconfiguration(), SchemaCompatibilityTestingSnapshot.thatIsCompatibleWithNextSerializerAfterMigration(), }; final TypeSerializer<?>[] testNewSerializers = new TypeSerializer<?>[] { new SchemaCompatibilityTestingSerializer(), new SchemaCompatibilityTestingSerializer(), new SchemaCompatibilityTestingSerializer(), new SchemaCompatibilityTestingSerializer() }; IntermediateCompatibilityResult<?> intermediateCompatibilityResult = CompositeTypeSerializerUtil.constructIntermediateCompatibilityResult(testNewSerializers, testSerializerSnapshots); assertTrue(intermediateCompatibilityResult.isIncompatible()); assertTrue(intermediateCompatibilityResult.getFinalResult().isIncompatible()); }