snuyanzin commented on code in PR #19538:
URL: https://github.com/apache/flink/pull/19538#discussion_r866296097
##########
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/typeutils/FieldInfoUtilsTest.java:
##########
@@ -25,55 +25,63 @@
import org.apache.flink.api.java.typeutils.RowTypeInfo;
import org.apache.flink.table.expressions.Expression;
-import org.junit.Test;
-import org.junit.experimental.runners.Enclosed;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
import java.sql.Timestamp;
import java.util.Arrays;
-import java.util.Collection;
+import java.util.stream.Stream;
import static org.apache.flink.table.api.Expressions.$;
import static org.assertj.core.api.Assertions.assertThat;
/** Test suite for {@link FieldInfoUtils}. */
-@RunWith(Enclosed.class)
-public class FieldInfoUtilsTest {
+class FieldInfoUtilsTest {
/** Test for ByNameMode. */
- @RunWith(Parameterized.class)
- public static final class TestByNameMode {
-
- @Parameterized.Parameters(name = "{0}")
- public static Collection<TypeInformation> parameters() throws
Exception {
- return Arrays.asList(
- new RowTypeInfo(
- new TypeInformation[] {Types.INT, Types.LONG,
Types.SQL_TIMESTAMP},
- new String[] {"f0", "f1", "f2"}),
- new PojoTypeInfo(
- MyPojo.class,
- Arrays.asList(
- new
PojoField(MyPojo.class.getDeclaredField("f0"), Types.INT),
- new
PojoField(MyPojo.class.getDeclaredField("f1"), Types.LONG),
- new PojoField(
-
MyPojo.class.getDeclaredField("f2"),
- Types.SQL_TIMESTAMP))));
+ @Nested
+ @TestInstance(TestInstance.Lifecycle.PER_CLASS)
+ class TestByNameMode {
+
+ Stream<Arguments> parameters() throws Exception {
Review Comment:
yes, you're right
--
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]