You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/20 17:09:57 UTC

[GitHub] [flink] snuyanzin commented on a diff in pull request #19467: [FLINK-25548][flink-sql-parser] Migrate tests to JUnit5

snuyanzin commented on code in PR #19467:
URL: https://github.com/apache/flink/pull/19467#discussion_r854370265


##########
flink-table/flink-sql-parser/src/test/java/org/apache/flink/sql/parser/TableApiIdentifierParsingTest.java:
##########
@@ -26,49 +26,44 @@
 import org.apache.calcite.sql.SqlIdentifier;
 import org.apache.calcite.sql.parser.SqlAbstractParserImpl;
 import org.apache.calcite.util.SourceStringReader;
-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 java.util.List;
+import java.util.stream.Stream;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.singletonList;
 import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.params.provider.Arguments.of;
 
 /** Tests for parsing a Table API specific SqlIdentifier. */
-@RunWith(Parameterized.class)
 public class TableApiIdentifierParsingTest {
 
     private static final String ANTHROPOS_IN_GREEK_IN_UNICODE =
             "#03B1#03BD#03B8#03C1#03C9#03C0#03BF#03C2";
     private static final String ANTHROPOS_IN_GREEK = "ανθρωπος";
 
-    @Parameterized.Parameters(name = "Parsing: {0}. Expected identifier: {1}")
-    public static Object[][] parameters() {
-        return new Object[][] {
-            new Object[] {"array", singletonList("array")},
-            new Object[] {"table", singletonList("table")},
-            new Object[] {"cat.db.array", asList("cat", "db", "array")},
-            new Object[] {"`cat.db`.table", asList("cat.db", "table")},
-            new Object[] {"db.table", asList("db", "table")},
-            new Object[] {"`ta``ble`", singletonList("ta`ble")},
-            new Object[] {"`c``at`.`d``b`.`ta``ble`", asList("c`at", "d`b", "ta`ble")},
-            new Object[] {
-                "db.U&\"" + ANTHROPOS_IN_GREEK_IN_UNICODE + "\" UESCAPE '#'",
-                asList("db", ANTHROPOS_IN_GREEK)
-            },
-            new Object[] {"db.ανθρωπος", asList("db", ANTHROPOS_IN_GREEK)}
-        };
+    public static Stream<Arguments> parameters() {

Review Comment:
   yes, you're right, I set this and other similar to package private



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org