[FLINK-32997][table-planner][JUnit5 Migration] Module: flink-formats (StreamingTestBase)

pull/23751/head
Jiabao Sun 1 year ago committed by Leonard Xu
parent 2fc28f80ea
commit 6ece3aa71e

@ -18,13 +18,25 @@
package org.apache.flink.formats.avro;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.table.planner.runtime.stream.FsStreamingSinkITCaseBase;
import org.apache.flink.test.junit5.MiniClusterExtension;
import org.junit.jupiter.api.extension.RegisterExtension;
import java.util.ArrayList;
import java.util.List;
/** ITCase to test avro format for {@link AvroFileSystemFormatFactory} in stream mode. */
public class AvroFilesystemStreamITCase extends FsStreamingSinkITCaseBase {
class AvroFilesystemStreamITCase extends FsStreamingSinkITCaseBase {
@RegisterExtension
private static final MiniClusterExtension MINI_CLUSTER_RESOURCE =
new MiniClusterExtension(
new MiniClusterResourceConfiguration.Builder()
.setNumberTaskManagers(1)
.setNumberSlotsPerTaskManager(4)
.build());
@Override
public String[] additionalProperties() {

@ -18,7 +18,11 @@
package org.apache.flink.formats.csv;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.table.planner.runtime.stream.sql.StreamFileSystemITCaseBase;
import org.apache.flink.test.junit5.MiniClusterExtension;
import org.junit.jupiter.api.extension.RegisterExtension;
import java.util.ArrayList;
import java.util.List;
@ -26,6 +30,14 @@ import java.util.List;
/** ITCase to test csv format for {@link CsvFileFormatFactory} in stream mode. */
class CsvFilesystemStreamITCase extends StreamFileSystemITCaseBase {
@RegisterExtension
private static final MiniClusterExtension MINI_CLUSTER_RESOURCE =
new MiniClusterExtension(
new MiniClusterResourceConfiguration.Builder()
.setNumberTaskManagers(1)
.setNumberSlotsPerTaskManager(4)
.build());
@Override
public boolean supportsReadingMetadata() {
return false;

@ -18,13 +18,26 @@
package org.apache.flink.formats.csv;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.table.planner.runtime.stream.FsStreamingSinkITCaseBase;
import org.apache.flink.test.junit5.MiniClusterExtension;
import org.junit.jupiter.api.extension.RegisterExtension;
import java.util.ArrayList;
import java.util.List;
/** ITCase to test csv format for {@link CsvFileFormatFactory} for streaming sink. */
public class CsvFilesystemStreamSinkITCase extends FsStreamingSinkITCaseBase {
class CsvFilesystemStreamSinkITCase extends FsStreamingSinkITCaseBase {
@RegisterExtension
private static final MiniClusterExtension MINI_CLUSTER_RESOURCE =
new MiniClusterExtension(
new MiniClusterResourceConfiguration.Builder()
.setNumberTaskManagers(1)
.setNumberSlotsPerTaskManager(4)
.build());
@Override
public String[] additionalProperties() {
List<String> ret = new ArrayList<>();

@ -18,13 +18,25 @@
package org.apache.flink.formats.json;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.table.planner.runtime.stream.FsStreamingSinkITCaseBase;
import org.apache.flink.test.junit5.MiniClusterExtension;
import org.junit.jupiter.api.extension.RegisterExtension;
import java.util.ArrayList;
import java.util.List;
/** Test checkpoint for file system table factory with json format. */
public class JsonFsStreamSinkITCase extends FsStreamingSinkITCaseBase {
class JsonFsStreamSinkITCase extends FsStreamingSinkITCaseBase {
@RegisterExtension
private static final MiniClusterExtension MINI_CLUSTER_RESOURCE =
new MiniClusterExtension(
new MiniClusterResourceConfiguration.Builder()
.setNumberTaskManagers(1)
.setNumberSlotsPerTaskManager(4)
.build());
@Override
public String[] additionalProperties() {

@ -18,12 +18,15 @@
package org.apache.flink.formats.json.debezium;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.table.planner.runtime.utils.StreamingTestBase;
import org.apache.flink.test.junit5.MiniClusterExtension;
import org.apache.flink.types.Row;
import org.apache.flink.util.CloseableIterator;
import org.apache.flink.util.CollectionUtil;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.jupiter.api.io.TempDir;
import java.io.File;
@ -41,6 +44,14 @@ import static org.assertj.core.api.Assertions.assertThat;
/** Test Filesystem connector with DebeziumJson. */
class DebeziumJsonFileSystemITCase extends StreamingTestBase {
@RegisterExtension
private static final MiniClusterExtension MINI_CLUSTER_RESOURCE =
new MiniClusterExtension(
new MiniClusterResourceConfiguration.Builder()
.setNumberTaskManagers(1)
.setNumberSlotsPerTaskManager(4)
.build());
private static final List<String> EXPECTED =
Arrays.asList(
"+I[101, SCOOTER, Small 2-wheel scooter, 3.14]",

@ -18,12 +18,15 @@
package org.apache.flink.formats.json.ogg;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.table.planner.runtime.utils.StreamingTestBase;
import org.apache.flink.test.junit5.MiniClusterExtension;
import org.apache.flink.types.Row;
import org.apache.flink.util.CloseableIterator;
import org.apache.flink.util.CollectionUtil;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.jupiter.api.io.TempDir;
import java.io.File;
@ -41,6 +44,14 @@ import static org.assertj.core.api.Assertions.assertThat;
/** Test Filesystem connector with OGG Json. */
class OggJsonFileSystemITCase extends StreamingTestBase {
@RegisterExtension
private static final MiniClusterExtension MINI_CLUSTER_RESOURCE =
new MiniClusterExtension(
new MiniClusterResourceConfiguration.Builder()
.setNumberTaskManagers(1)
.setNumberSlotsPerTaskManager(4)
.build());
private static final List<String> EXPECTED =
Arrays.asList(
"+I[101, SCOOTER, Small 2-wheel scooter, 3.14]",

@ -18,13 +18,25 @@
package org.apache.flink.orc;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.table.planner.runtime.stream.FsStreamingSinkITCaseBase;
import org.apache.flink.test.junit5.MiniClusterExtension;
import org.junit.jupiter.api.extension.RegisterExtension;
import java.util.ArrayList;
import java.util.List;
/** Checkpoint ITCase for {@link OrcFileFormatFactory}. */
public class OrcFsStreamingSinkITCase extends FsStreamingSinkITCaseBase {
class OrcFsStreamingSinkITCase extends FsStreamingSinkITCaseBase {
@RegisterExtension
private static final MiniClusterExtension MINI_CLUSTER_RESOURCE =
new MiniClusterExtension(
new MiniClusterResourceConfiguration.Builder()
.setNumberTaskManagers(1)
.setNumberSlotsPerTaskManager(4)
.build());
@Override
public String[] additionalProperties() {

@ -18,13 +18,25 @@
package org.apache.flink.formats.parquet;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
import org.apache.flink.table.planner.runtime.stream.FsStreamingSinkITCaseBase;
import org.apache.flink.test.junit5.MiniClusterExtension;
import org.junit.jupiter.api.extension.RegisterExtension;
import java.util.ArrayList;
import java.util.List;
/** Checkpoint ITCase for {@link ParquetFileFormatFactory}. */
public class ParquetFsStreamingSinkITCase extends FsStreamingSinkITCaseBase {
class ParquetFsStreamingSinkITCase extends FsStreamingSinkITCaseBase {
@RegisterExtension
private static final MiniClusterExtension MINI_CLUSTER_RESOURCE =
new MiniClusterExtension(
new MiniClusterResourceConfiguration.Builder()
.setNumberTaskManagers(1)
.setNumberSlotsPerTaskManager(4)
.build());
@Override
public String[] additionalProperties() {

Loading…
Cancel
Save