This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new d8fd9b1 [Followup] Migrate to Junit5 (#14)
d8fd9b1 is described below
commit d8fd9b1b0037b257ee1127f0c4e1bb6253d0db6d
Author: Junfan Zhang <[email protected]>
AuthorDate: Mon Jul 4 19:01:07 2022 +0800
[Followup] Migrate to Junit5 (#14)
### What changes were proposed in this pull request?
Migrate to Junit5 in module of server.
### Why are the changes needed?
Now, the module of server test cases are invalid.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
No need.
---
server/pom.xml | 10 ++++++++++
.../server/storage/HdfsStorageManagerTest.java | 19 +++++++++----------
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/server/pom.xml b/server/pom.xml
index 1051c3a..6318154 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -72,6 +72,16 @@
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-rules</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ <exclusion>
+ <artifactId>junit-dep</artifactId>
+ <groupId>junit</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
diff --git
a/server/src/test/java/org/apache/uniffle/server/storage/HdfsStorageManagerTest.java
b/server/src/test/java/org/apache/uniffle/server/storage/HdfsStorageManagerTest.java
index 32760a1..edb7762 100644
---
a/server/src/test/java/org/apache/uniffle/server/storage/HdfsStorageManagerTest.java
+++
b/server/src/test/java/org/apache/uniffle/server/storage/HdfsStorageManagerTest.java
@@ -24,28 +24,27 @@ import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import org.apache.uniffle.server.ShuffleServerConf;
import org.apache.uniffle.server.ShuffleServerMetrics;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
import org.apache.uniffle.common.RemoteStorageInfo;
import org.apache.uniffle.storage.common.HdfsStorage;
import org.apache.uniffle.storage.util.StorageType;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertSame;
public class HdfsStorageManagerTest {
- @Before
- public void prepare() {
+ @BeforeAll
+ public static void prepare() {
ShuffleServerMetrics.register();
}
- @After
- public void clear() {
+ @AfterAll
+ public static void clear() {
ShuffleServerMetrics.clear();
}