You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by dw...@apache.org on 2021/02/12 10:13:35 UTC

[flink] branch master updated: [FLINK-21337] ComparableInputTypeStrategyTests is not running

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

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


The following commit(s) were added to refs/heads/master by this push:
     new dbba847  [FLINK-21337] ComparableInputTypeStrategyTests is not running
dbba847 is described below

commit dbba8478a90f3e1c62ca76cb74f0933dcd877888
Author: Dawid Wysakowicz <dw...@apache.org>
AuthorDate: Tue Feb 9 15:14:28 2021 +0100

    [FLINK-21337] ComparableInputTypeStrategyTests is not running
---
 ...gyTests.java => ComparableInputTypeStrategyTest.java} | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/inference/ComparableInputTypeStrategyTests.java b/flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/inference/ComparableInputTypeStrategyTest.java
similarity index 96%
rename from flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/inference/ComparableInputTypeStrategyTests.java
rename to flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/inference/ComparableInputTypeStrategyTest.java
index 2ffc873..c190a91 100644
--- a/flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/inference/ComparableInputTypeStrategyTests.java
+++ b/flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/inference/ComparableInputTypeStrategyTest.java
@@ -19,7 +19,8 @@
 package org.apache.flink.table.types.inference;
 
 import org.apache.flink.api.common.ExecutionConfig;
-import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.common.typeutils.TypeSerializer;
+import org.apache.flink.api.java.typeutils.runtime.PojoSerializer;
 import org.apache.flink.api.java.typeutils.runtime.kryo.KryoSerializer;
 import org.apache.flink.table.api.DataTypes;
 import org.apache.flink.table.catalog.ObjectIdentifier;
@@ -35,6 +36,7 @@ import org.junit.runners.Parameterized;
 
 import javax.annotation.Nonnull;
 
+import java.lang.reflect.Field;
 import java.util.List;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
@@ -43,7 +45,7 @@ import static java.util.Arrays.asList;
 import static java.util.Collections.singletonList;
 
 /** Tests for {@link ComparableTypeStrategy}. */
-public class ComparableInputTypeStrategyTests extends InputTypeStrategiesTestBase {
+public class ComparableInputTypeStrategyTest extends InputTypeStrategiesTestBase {
 
     @Parameterized.Parameters(name = "{index}: {0}")
     public static List<TestSpec> testData() {
@@ -256,11 +258,17 @@ public class ComparableInputTypeStrategyTests extends InputTypeStrategiesTestBas
                                 InputTypeStrategies.TWO_EQUALS_COMPARABLE)
                         .calledWithArgumentTypes(
                                 rawType(NotComparableClass.class),
-                                DataTypes.RAW(TypeInformation.of(NotComparableClass.class)))
+                                DataTypes.RAW(
+                                        NotComparableClass.class,
+                                        new PojoSerializer<>(
+                                                NotComparableClass.class,
+                                                new TypeSerializer[0],
+                                                new Field[0],
+                                                new ExecutionConfig())))
                         .expectErrorMessage(
                                 String.format(
                                         "All types in a comparison should support 'EQUALS' comparison with"
-                                                + " each other. Can not compare RAW('%s', '...') with RAW('%s', ?)",
+                                                + " each other. Can not compare RAW('%s', '...') with RAW('%s', '...')",
                                         NotComparableClass.class.getName(),
                                         NotComparableClass.class.getName())),
                 TestSpec.forStrategy(