Skip to content

Commit 5384ab2

Browse files
authored
[FLINK-37714][Connector/Kafka] Generate entities in a temporary folder while tests
* [FLINK-37714] Generate entities in a temporary folder while tests * [FLINK-37714] Address feedback and migrate KafkaTableITCase to JUnit5
1 parent 89badde commit 5384ab2

File tree

4 files changed

+170
-137
lines changed

4 files changed

+170
-137
lines changed

flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaChangelogTableITCase.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
import org.apache.flink.table.api.config.ExecutionConfigOptions;
3232

3333
import org.apache.kafka.clients.producer.ProducerConfig;
34-
import org.junit.Before;
35-
import org.junit.Test;
34+
import org.junit.jupiter.api.BeforeEach;
35+
import org.junit.jupiter.api.Test;
3636

3737
import java.time.Duration;
3838
import java.time.ZoneId;
@@ -44,17 +44,17 @@
4444
import static org.apache.flink.streaming.connectors.kafka.table.KafkaTableTestUtils.waitingExpectedResults;
4545

4646
/** IT cases for Kafka with changelog format for Table API & SQL. */
47-
public class KafkaChangelogTableITCase extends KafkaTableTestBase {
47+
class KafkaChangelogTableITCase extends KafkaTableTestBase {
4848

49-
@Before
50-
public void before() {
49+
@BeforeEach
50+
void before() {
5151
// we have to use single parallelism,
5252
// because we will count the messages in sink to terminate the job
5353
env.setParallelism(1);
5454
}
5555

5656
@Test
57-
public void testKafkaDebeziumChangelogSource() throws Exception {
57+
void testKafkaDebeziumChangelogSource() throws Exception {
5858
final String topic = "changelog_topic";
5959
createTestTopic(topic, 1, 1);
6060

@@ -180,7 +180,7 @@ public void testKafkaDebeziumChangelogSource() throws Exception {
180180
}
181181

182182
@Test
183-
public void testKafkaCanalChangelogSource() throws Exception {
183+
void testKafkaCanalChangelogSource() throws Exception {
184184
final String topic = "changelog_canal";
185185
createTestTopic(topic, 1, 1);
186186

@@ -320,7 +320,7 @@ public void testKafkaCanalChangelogSource() throws Exception {
320320
}
321321

322322
@Test
323-
public void testKafkaMaxwellChangelogSource() throws Exception {
323+
void testKafkaMaxwellChangelogSource() throws Exception {
324324
final String topic = "changelog_maxwell";
325325
createTestTopic(topic, 1, 1);
326326

0 commit comments

Comments
 (0)