You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2019/12/20 06:55:34 UTC

[flink] 09/11: [FLINK-11767] In TypeSerializerUpgradeTestBase move migration version to base class

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

tzulitai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 99ff931f5e93dd3e5b345330c4c013c33abc1949
Author: Aljoscha Krettek <al...@apache.org>
AuthorDate: Tue Dec 10 13:44:15 2019 +0100

    [FLINK-11767] In TypeSerializerUpgradeTestBase move migration version to base class
    
    Tests derived from this should use the list of migrations versions from
    the base class, to ensure that we always update all the tests in
    lockstep.
---
 .../flink/api/common/typeutils/TypeSerializerUpgradeTestBase.java   | 6 ++++++
 .../flink/api/java/typeutils/runtime/PojoSerializerUpgradeTest.java | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/flink-core/src/test/java/org/apache/flink/api/common/typeutils/TypeSerializerUpgradeTestBase.java b/flink-core/src/test/java/org/apache/flink/api/common/typeutils/TypeSerializerUpgradeTestBase.java
index d1c3b63..a355837 100644
--- a/flink-core/src/test/java/org/apache/flink/api/common/typeutils/TypeSerializerUpgradeTestBase.java
+++ b/flink-core/src/test/java/org/apache/flink/api/common/typeutils/TypeSerializerUpgradeTestBase.java
@@ -51,6 +51,12 @@ import static org.junit.Assume.assumeThat;
  */
 public abstract class TypeSerializerUpgradeTestBase<PreviousElementT, UpgradedElementT> extends TestLogger {
 
+	protected static final MigrationVersion[] migrationVersions = new MigrationVersion[]{
+			MigrationVersion.v1_7,
+			MigrationVersion.v1_8,
+			MigrationVersion.v1_9,
+	};
+
 	private final TestSpecification<PreviousElementT, UpgradedElementT> testSpecification;
 
 	protected TypeSerializerUpgradeTestBase(TestSpecification<PreviousElementT, UpgradedElementT> testSpecification) {
diff --git a/flink-core/src/test/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializerUpgradeTest.java b/flink-core/src/test/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializerUpgradeTest.java
index b96f3dd..f642afe 100644
--- a/flink-core/src/test/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializerUpgradeTest.java
+++ b/flink-core/src/test/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializerUpgradeTest.java
@@ -39,12 +39,6 @@ public class PojoSerializerUpgradeTest extends TypeSerializerUpgradeTestBase<Obj
 
 	@Parameterized.Parameters(name = "Test Specification = {0}")
 	public static Collection<TestSpecification<?, ?>> testSpecifications() throws Exception {
-		MigrationVersion[] migrationVersions = new MigrationVersion[]{
-				MigrationVersion.v1_7,
-				MigrationVersion.v1_8,
-				MigrationVersion.v1_9,
-		};
-
 		ArrayList<TestSpecification<?, ?>> testSpecifications = new ArrayList<>();
 		for (MigrationVersion migrationVersion : migrationVersions) {
 			testSpecifications.add(