This is an automated email from the ASF dual-hosted git repository.

reswqa pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/flink-connector-elasticsearch.git


The following commit(s) were added to refs/heads/main by this push:
     new 042152d  [FLINK-39747][test] Upgrade test to junit 5 and remove junit4 
dependency
042152d is described below

commit 042152d7c71bbde26032577a4192e2a9a59bf95b
Author: vernedeng <[email protected]>
AuthorDate: Tue May 26 14:25:10 2026 +0800

    [FLINK-39747][test] Upgrade test to junit 5 and remove junit4 dependency
---
 .../flink/streaming/tests/ElasticsearchLookupE2ECase.java  | 14 +++++++-------
 pom.xml                                                    | 13 -------------
 2 files changed, 7 insertions(+), 20 deletions(-)

diff --git 
a/flink-connector-elasticsearch-e2e-tests/flink-connector-elasticsearch-e2e-tests-common/src/main/java/org/apache/flink/streaming/tests/ElasticsearchLookupE2ECase.java
 
b/flink-connector-elasticsearch-e2e-tests/flink-connector-elasticsearch-e2e-tests-common/src/main/java/org/apache/flink/streaming/tests/ElasticsearchLookupE2ECase.java
index 19a9740..8456f9c 100644
--- 
a/flink-connector-elasticsearch-e2e-tests/flink-connector-elasticsearch-e2e-tests-common/src/main/java/org/apache/flink/streaming/tests/ElasticsearchLookupE2ECase.java
+++ 
b/flink-connector-elasticsearch-e2e-tests/flink-connector-elasticsearch-e2e-tests-common/src/main/java/org/apache/flink/streaming/tests/ElasticsearchLookupE2ECase.java
@@ -29,8 +29,8 @@ import 
org.apache.flink.table.api.bridge.java.StreamTableEnvironment;
 import org.apache.flink.types.Row;
 import org.apache.flink.util.CollectionUtil;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.testcontainers.elasticsearch.ElasticsearchContainer;
 
 import java.util.ArrayList;
@@ -39,7 +39,7 @@ import java.util.List;
 import java.util.stream.Collectors;
 
 import static org.apache.flink.table.api.Expressions.$;
-import static org.junit.Assert.assertEquals;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /** Base class for end to end Elasticsearch lookup. */
 public abstract class ElasticsearchLookupE2ECase {
@@ -66,15 +66,15 @@ public abstract class ElasticsearchLookupE2ECase {
 
     abstract String getEsOptions();
 
-    @Before
-    public void before() {
+    @BeforeEach
+    void before() {
         this.streamSettings = EnvironmentSettings.inStreamingMode();
         elasticsearchContainer = new 
ElasticsearchContainer(getElasticsearchContainerName());
         elasticsearchContainer.start();
     }
 
     @Test
-    public void testEsLookupTableSource() {
+    void testEsLookupTableSource() {
         StreamExecutionEnvironment execEnv = 
StreamExecutionEnvironment.getExecutionEnvironment();
         StreamTableEnvironment tEnv = StreamTableEnvironment.create(execEnv, 
streamSettings);
 
@@ -121,6 +121,6 @@ public abstract class ElasticsearchLookupE2ECase {
         expected.add("+I[2, 2, Hello, 2, john]");
         expected.add("+I[3, 2, Hello Yubin Li, 3, ted]");
 
-        assertEquals(expected, result);
+        assertThat(result).isEqualTo(expected);
     }
 }
diff --git a/pom.xml b/pom.xml
index 98dbf91..2715d59 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,6 @@ under the License.
                <scala.binary.version>2.12</scala.binary.version>
 
                <jackson-bom.version>2.15.3</jackson-bom.version>
-               <junit4.version>4.13.2</junit4.version>
                <junit5.version>5.10.2</junit5.version>
                <assertj.version>3.25.3</assertj.version>
                <testcontainers.version>1.19.7</testcontainers.version>
@@ -99,12 +98,6 @@ under the License.
                        <scope>test</scope>
                </dependency>
 
-               <dependency>
-                       <groupId>org.junit.vintage</groupId>
-                       <artifactId>junit-vintage-engine</artifactId>
-                       <scope>test</scope>
-               </dependency>
-
                <dependency>
                        <groupId>org.assertj</groupId>
                        <artifactId>assertj-core</artifactId>
@@ -335,12 +328,6 @@ under the License.
                                <scope>import</scope>
                        </dependency>
 
-                       <dependency>
-                               <groupId>junit</groupId>
-                               <artifactId>junit</artifactId>
-                               <version>${junit4.version}</version>
-                       </dependency>
-
                        <dependency>
                                <groupId>org.assertj</groupId>
                                <artifactId>assertj-core</artifactId>

Reply via email to