You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2023/03/30 06:55:00 UTC
[incubator-paimon] branch master updated: [test] Using Junit5 test logger extension in flink test module (#725)
This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git
The following commit(s) were added to refs/heads/master by this push:
new bc449da7f [test] Using Junit5 test logger extension in flink test module (#725)
bc449da7f is described below
commit bc449da7f4d16a1224e39a9e65f0bf01b1b7caed
Author: Kerwin <37...@users.noreply.github.com>
AuthorDate: Thu Mar 30 14:54:56 2023 +0800
[test] Using Junit5 test logger extension in flink test module (#725)
---
.../apache/paimon/flink/util/AbstractTestBase.java | 6 ++++--
paimon-test-utils/pom.xml | 21 ++++++++++++++++++++-
pom.xml | 1 -
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/util/AbstractTestBase.java b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/util/AbstractTestBase.java
index 45d82f59a..410b1a7fe 100644
--- a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/util/AbstractTestBase.java
+++ b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/util/AbstractTestBase.java
@@ -18,13 +18,14 @@
package org.apache.paimon.flink.util;
+import org.apache.paimon.testutils.junit.TestLoggerExtension;
import org.apache.paimon.utils.FileIOUtils;
import org.apache.flink.client.program.ClusterClient;
import org.apache.flink.runtime.client.JobStatusMessage;
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
-import org.apache.flink.util.TestLogger;
import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.jupiter.api.io.TempDir;
import org.slf4j.Logger;
@@ -36,7 +37,8 @@ import java.nio.file.Path;
import java.util.UUID;
/** Similar to Flink's AbstractTestBase but using Junit5. */
-public class AbstractTestBase extends TestLogger {
+@ExtendWith({TestLoggerExtension.class})
+public class AbstractTestBase {
private static final Logger LOG = LoggerFactory.getLogger(AbstractTestBase.class);
diff --git a/paimon-test-utils/pom.xml b/paimon-test-utils/pom.xml
index a05c714dc..0c94aafe5 100644
--- a/paimon-test-utils/pom.xml
+++ b/paimon-test-utils/pom.xml
@@ -35,7 +35,11 @@ under the License.
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
- <version>${junit5.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
</dependency>
<dependency>
@@ -44,6 +48,21 @@ under the License.
<version>${assertj.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ </dependency>
+
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
diff --git a/pom.xml b/pom.xml
index 40c476b93..205161b76 100644
--- a/pom.xml
+++ b/pom.xml
@@ -145,7 +145,6 @@ under the License.
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
- <version>${junit5.version}</version>
<scope>test</scope>
</dependency>