You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by al...@apache.org on 2020/05/28 11:51:27 UTC

[flink] 01/42: [FLINK-13632] Remove old PojoSerializerSnapshotMigrationTest

This is an automated email from the ASF dual-hosted git repository.

aljoscha pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git

commit fdb12114461794eec1ba857ed5d0eff51bb9ad8f
Author: Aljoscha Krettek <al...@apache.org>
AuthorDate: Fri Jan 24 10:52:23 2020 +0100

    [FLINK-13632] Remove old PojoSerializerSnapshotMigrationTest
---
 .../PojoSerializerSnapshotMigrationTest.java       | 169 ---------------------
 ...1.6-pojo-new-and-removed-fields-serializer-data | Bin 320 -> 0 bytes
 ...pojo-new-and-removed-fields-serializer-snapshot | Bin 4696 -> 0 bytes
 ...nk-1.6-pojo-registered-subclass-serializer-data | Bin 350 -> 0 bytes
 ....6-pojo-registered-subclass-serializer-snapshot | Bin 9236 -> 0 bytes
 .../test/resources/flink-1.6-pojo-serializer-data  | Bin 230 -> 0 bytes
 .../resources/flink-1.6-pojo-serializer-snapshot   | Bin 4133 -> 0 bytes
 ...-1.6-pojo-unregistered-subclass-serializer-data | Bin 1320 -> 0 bytes
 ...-pojo-unregistered-subclass-serializer-snapshot | Bin 8890 -> 0 bytes
 ...1.7-pojo-new-and-removed-fields-serializer-data | Bin 320 -> 0 bytes
 ...pojo-new-and-removed-fields-serializer-snapshot | Bin 4724 -> 0 bytes
 ...nk-1.7-pojo-registered-subclass-serializer-data | Bin 350 -> 0 bytes
 ....7-pojo-registered-subclass-serializer-snapshot | Bin 12183 -> 0 bytes
 .../test/resources/flink-1.7-pojo-serializer-data  | Bin 230 -> 0 bytes
 .../resources/flink-1.7-pojo-serializer-snapshot   | Bin 4148 -> 0 bytes
 ...-1.7-pojo-unregistered-subclass-serializer-data | Bin 1320 -> 0 bytes
 ...-pojo-unregistered-subclass-serializer-snapshot | Bin 11832 -> 0 bytes
 17 files changed, 169 deletions(-)

diff --git a/flink-core/src/test/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializerSnapshotMigrationTest.java b/flink-core/src/test/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializerSnapshotMigrationTest.java
deleted file mode 100644
index fa83f05..0000000
--- a/flink-core/src/test/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializerSnapshotMigrationTest.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.api.java.typeutils.runtime;
-
-import org.apache.flink.api.common.ExecutionConfig;
-import org.apache.flink.api.common.typeutils.TypeSerializer;
-import org.apache.flink.api.common.typeutils.TypeSerializerSchemaCompatibility;
-import org.apache.flink.api.common.typeutils.TypeSerializerSnapshotMigrationTestBase;
-import org.apache.flink.api.java.typeutils.TypeExtractor;
-import org.apache.flink.testutils.migration.MigrationVersion;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-
-import java.util.Collection;
-
-import static org.apache.flink.api.common.typeutils.TypeSerializerMatchers.hasSameCompatibilityAs;
-import static org.apache.flink.api.common.typeutils.TypeSerializerMatchers.isCompatibleWithReconfiguredSerializer;
-import static org.junit.Assert.assertTrue;
-
-/**
- * Migration tests for the {@link PojoSerializerSnapshot}.
- */
-@RunWith(Parameterized.class)
-public class PojoSerializerSnapshotMigrationTest extends TypeSerializerSnapshotMigrationTestBase<Object> {
-
-	public static class TestPojo {
-		public int id;
-		public String name;
-		public int age;
-
-		public TestPojo() {}
-
-		public TestPojo(int id, String name, int age) {
-			this.id = id;
-			this.name = name;
-			this.age = age;
-		}
-	}
-
-	/**
-	 * Data test files of test specification that used this type
-	 * had 2 fields {@code idRemoved} and {@code heightRemoved} that
-	 * are no longer present in this current POJO.
-	 */
-	public static class TestPojoWithNewAndRemovedFields {
-
-		public enum Color {
-			RED,
-			BLUE,
-			GREEN,
-			YELLOW
-		}
-
-		public String name;
-		public int age;
-		public String githubId;
-		public Color favoriteColor;
-		public boolean married;
-
-		public TestPojoWithNewAndRemovedFields() {}
-
-		public TestPojoWithNewAndRemovedFields(String name, int age, String githubId, Color favoriteColor, boolean married) {
-			this.name = name;
-			this.age = age;
-			this.githubId = githubId;
-			this.favoriteColor = favoriteColor;
-			this.married = married;
-		}
-	}
-
-	/**
-	 * Data test files of test specification that used this type
-	 * had the data written using {@code PojoSerializer}s generated
-	 * using the base class {@code TestPojo}.
-	 */
-	public static class TestPojoSubclass extends TestPojo {
-		public String githubId;
-
-		public TestPojoSubclass() {}
-
-		public TestPojoSubclass(int id, String name, int age, String githubId) {
-			super(id, name, age);
-			this.githubId = githubId;
-		}
-	}
-
-	public PojoSerializerSnapshotMigrationTest(TestSpecification<Object> testSpecification) {
-		super(testSpecification);
-	}
-
-	@SuppressWarnings("unchecked")
-	@Parameterized.Parameters(name = "Test Specification = {0}")
-	public static Collection<TestSpecification<?>> testSpecifications() {
-
-		final TestSpecifications testSpecifications = new TestSpecifications(MigrationVersion.v1_6, MigrationVersion.v1_7);
-
-		testSpecifications.add(
-			"pojo-serializer",
-			PojoSerializer.class,
-			PojoSerializerSnapshot.class,
-			PojoSerializerSnapshotMigrationTest::testPojoSerializerSupplier);
-
-		testSpecifications.addWithCompatibilityMatcher(
-			"pojo-new-and-removed-fields-serializer",
-			PojoSerializer.class,
-			PojoSerializerSnapshot.class,
-			PojoSerializerSnapshotMigrationTest::testPojoWithNewAndRemovedFieldsSerializerSupplier,
-			hasSameCompatibilityAs(TypeSerializerSchemaCompatibility.compatibleAfterMigration()));
-
-		testSpecifications.addWithCompatibilityMatcher(
-			"pojo-unregistered-subclass-serializer",
-			PojoSerializer.class,
-			PojoSerializerSnapshot.class,
-			PojoSerializerSnapshotMigrationTest::testPojoSerializerSupplier,
-			isCompatibleWithReconfiguredSerializer());
-
-		testSpecifications.add(
-			"pojo-registered-subclass-serializer",
-			PojoSerializer.class,
-			PojoSerializerSnapshot.class,
-			PojoSerializerSnapshotMigrationTest::testPojoSerializerWithSubclassRegisteredSupplier);
-
-		return testSpecifications.get();
-	}
-
-	private static TypeSerializer<TestPojo> testPojoSerializerSupplier() {
-		TypeSerializer<TestPojo> serializer =
-			TypeExtractor.createTypeInfo(TestPojo.class).createSerializer(new ExecutionConfig());
-
-		assertTrue(serializer instanceof PojoSerializer);
-		return serializer;
-	}
-
-	private static TypeSerializer<TestPojoWithNewAndRemovedFields> testPojoWithNewAndRemovedFieldsSerializerSupplier() {
-		TypeSerializer<TestPojoWithNewAndRemovedFields> serializer =
-			TypeExtractor.createTypeInfo(TestPojoWithNewAndRemovedFields.class).createSerializer(new ExecutionConfig());
-
-		assertTrue(serializer instanceof PojoSerializer);
-		return serializer;
-	}
-
-	private static TypeSerializer<TestPojo> testPojoSerializerWithSubclassRegisteredSupplier() {
-		ExecutionConfig executionConfig = new ExecutionConfig();
-		executionConfig.registerPojoType(TestPojoSubclass.class);
-
-		TypeSerializer<TestPojo> serializer =
-			TypeExtractor.createTypeInfo(TestPojo.class).createSerializer(executionConfig);
-
-		assertTrue(serializer instanceof PojoSerializer);
-		return serializer;
-	}
-}
diff --git a/flink-core/src/test/resources/flink-1.6-pojo-new-and-removed-fields-serializer-data b/flink-core/src/test/resources/flink-1.6-pojo-new-and-removed-fields-serializer-data
deleted file mode 100644
index 8d8e619..0000000
Binary files a/flink-core/src/test/resources/flink-1.6-pojo-new-and-removed-fields-serializer-data and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.6-pojo-new-and-removed-fields-serializer-snapshot b/flink-core/src/test/resources/flink-1.6-pojo-new-and-removed-fields-serializer-snapshot
deleted file mode 100644
index 9ebb10c..0000000
Binary files a/flink-core/src/test/resources/flink-1.6-pojo-new-and-removed-fields-serializer-snapshot and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.6-pojo-registered-subclass-serializer-data b/flink-core/src/test/resources/flink-1.6-pojo-registered-subclass-serializer-data
deleted file mode 100644
index ca0b187..0000000
Binary files a/flink-core/src/test/resources/flink-1.6-pojo-registered-subclass-serializer-data and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.6-pojo-registered-subclass-serializer-snapshot b/flink-core/src/test/resources/flink-1.6-pojo-registered-subclass-serializer-snapshot
deleted file mode 100644
index 4bb2055..0000000
Binary files a/flink-core/src/test/resources/flink-1.6-pojo-registered-subclass-serializer-snapshot and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.6-pojo-serializer-data b/flink-core/src/test/resources/flink-1.6-pojo-serializer-data
deleted file mode 100644
index 153528f..0000000
Binary files a/flink-core/src/test/resources/flink-1.6-pojo-serializer-data and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.6-pojo-serializer-snapshot b/flink-core/src/test/resources/flink-1.6-pojo-serializer-snapshot
deleted file mode 100644
index 4d53f6c..0000000
Binary files a/flink-core/src/test/resources/flink-1.6-pojo-serializer-snapshot and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.6-pojo-unregistered-subclass-serializer-data b/flink-core/src/test/resources/flink-1.6-pojo-unregistered-subclass-serializer-data
deleted file mode 100644
index 3450dd4..0000000
Binary files a/flink-core/src/test/resources/flink-1.6-pojo-unregistered-subclass-serializer-data and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.6-pojo-unregistered-subclass-serializer-snapshot b/flink-core/src/test/resources/flink-1.6-pojo-unregistered-subclass-serializer-snapshot
deleted file mode 100644
index 9231146..0000000
Binary files a/flink-core/src/test/resources/flink-1.6-pojo-unregistered-subclass-serializer-snapshot and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.7-pojo-new-and-removed-fields-serializer-data b/flink-core/src/test/resources/flink-1.7-pojo-new-and-removed-fields-serializer-data
deleted file mode 100644
index 8d8e619..0000000
Binary files a/flink-core/src/test/resources/flink-1.7-pojo-new-and-removed-fields-serializer-data and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.7-pojo-new-and-removed-fields-serializer-snapshot b/flink-core/src/test/resources/flink-1.7-pojo-new-and-removed-fields-serializer-snapshot
deleted file mode 100644
index 7de3813..0000000
Binary files a/flink-core/src/test/resources/flink-1.7-pojo-new-and-removed-fields-serializer-snapshot and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.7-pojo-registered-subclass-serializer-data b/flink-core/src/test/resources/flink-1.7-pojo-registered-subclass-serializer-data
deleted file mode 100644
index ca0b187..0000000
Binary files a/flink-core/src/test/resources/flink-1.7-pojo-registered-subclass-serializer-data and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.7-pojo-registered-subclass-serializer-snapshot b/flink-core/src/test/resources/flink-1.7-pojo-registered-subclass-serializer-snapshot
deleted file mode 100644
index ca6c054..0000000
Binary files a/flink-core/src/test/resources/flink-1.7-pojo-registered-subclass-serializer-snapshot and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.7-pojo-serializer-data b/flink-core/src/test/resources/flink-1.7-pojo-serializer-data
deleted file mode 100644
index 153528f..0000000
Binary files a/flink-core/src/test/resources/flink-1.7-pojo-serializer-data and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.7-pojo-serializer-snapshot b/flink-core/src/test/resources/flink-1.7-pojo-serializer-snapshot
deleted file mode 100644
index 4f5c928..0000000
Binary files a/flink-core/src/test/resources/flink-1.7-pojo-serializer-snapshot and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.7-pojo-unregistered-subclass-serializer-data b/flink-core/src/test/resources/flink-1.7-pojo-unregistered-subclass-serializer-data
deleted file mode 100644
index 3450dd4..0000000
Binary files a/flink-core/src/test/resources/flink-1.7-pojo-unregistered-subclass-serializer-data and /dev/null differ
diff --git a/flink-core/src/test/resources/flink-1.7-pojo-unregistered-subclass-serializer-snapshot b/flink-core/src/test/resources/flink-1.7-pojo-unregistered-subclass-serializer-snapshot
deleted file mode 100644
index 99a7482..0000000
Binary files a/flink-core/src/test/resources/flink-1.7-pojo-unregistered-subclass-serializer-snapshot and /dev/null differ