snuyanzin commented on code in PR #19467:
URL: https://github.com/apache/flink/pull/19467#discussion_r854370506
##########
flink-table/flink-sql-parser/src/test/java/org/apache/flink/sql/parser/FlinkDDLDataTypeTest.java:
##########
@@ -52,195 +52,203 @@
import org.apache.calcite.test.catalog.MockCatalogReaderSimple;
import org.apache.calcite.util.SourceStringReader;
import org.apache.calcite.util.Util;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
import javax.annotation.Nullable;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
+import java.util.stream.Stream;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.params.provider.Arguments.of;
/** Tests for all the supported Flink DDL data types. */
-@RunWith(Parameterized.class)
public class FlinkDDLDataTypeTest {
private static final Fixture FIXTURE = new
Fixture(TestFactory.INSTANCE.getTypeFactory());
private static final String DDL_FORMAT =
"create table t1 (\n" + " f0 %s\n" + ") with (\n" + " 'k1' =
'v1'\n" + ")";
- @Parameterized.Parameters(name = "{index}: {0}")
- public static List<TestItem> testData() {
- return Arrays.asList(
- createTestItem("CHAR", nullable(FIXTURE.char1Type), "CHAR"),
- createTestItem("CHAR NOT NULL", FIXTURE.char1Type, "CHAR NOT
NULL"),
- createTestItem("CHAR NOT \t\nNULL", FIXTURE.char1Type, "CHAR
NOT NULL"),
- createTestItem("char not null", FIXTURE.char1Type, "CHAR NOT
NULL"),
- createTestItem("CHAR NULL", nullable(FIXTURE.char1Type),
"CHAR"),
- createTestItem("CHAR(33)", nullable(FIXTURE.char33Type),
"CHAR(33)"),
- createTestItem("VARCHAR", nullable(FIXTURE.varcharType),
"VARCHAR"),
- createTestItem("VARCHAR(33)", nullable(FIXTURE.varchar33Type),
"VARCHAR(33)"),
- createTestItem(
+ public static Stream<Arguments> testData() {
Review Comment:
yes, you're right, I set this and other similar to package private
##########
flink-table/flink-sql-parser/src/test/java/org/apache/flink/sql/parser/FlinkDDLDataTypeTest.java:
##########
@@ -52,195 +52,203 @@
import org.apache.calcite.test.catalog.MockCatalogReaderSimple;
import org.apache.calcite.util.SourceStringReader;
import org.apache.calcite.util.Util;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
import javax.annotation.Nullable;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
+import java.util.stream.Stream;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.params.provider.Arguments.of;
/** Tests for all the supported Flink DDL data types. */
-@RunWith(Parameterized.class)
public class FlinkDDLDataTypeTest {
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]