This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new f5c2629 refactor(integrated-test): change Junit4 to Junit5 in
integrated-test module (#2855)
f5c2629 is described below
commit f5c26296754057626e33d7749387b94c95a24d1a
Author: luoxiaolong <[email protected]>
AuthorDate: Thu Feb 10 14:08:15 2022 +0800
refactor(integrated-test): change Junit4 to Junit5 in integrated-test
module (#2855)
---
.../test/agent/jaeger/JaegerPluginTest.java | 10 ++---
.../opentelemetry/OpenTelemetryPluginTest.java | 27 +++++------
.../test/agent/zipkin/ZipkinPluginTest.java | 12 ++---
.../dubbo/AlibabaDubboPluginMultiParamTest.java | 18 ++++----
.../test/alibaba/dubbo/AlibabaDubboPluginTest.java | 18 ++++----
.../dubbo/ApacheDubboPluginMultiParamTest.java | 10 ++---
.../test/alibaba/dubbo/ApacheDubboPluginTest.java | 10 ++---
.../test/combination/MultiRequestPluginTest.java | 4 +-
.../combination/RequestAndResponsePluginTest.java | 4 +-
.../test/combination/RpcAndRequestPluginTest.java | 14 +++---
.../integrated/test/grpc/GrpcPluginTest.java | 10 ++---
.../integrated/test/http/DividePluginTest.java | 4 +-
.../test/http/HttpTestControllerTest.java | 6 +--
.../integrated/test/http/OrderControllerTest.java | 4 +-
.../test/http/RequestControllerTest.java | 6 +--
.../test/http/ShenyuClientPathControllerTest.java | 4 +-
.../http/SpringMvcMappingPathControllerTest.java | 4 +-
.../http/combination/ContextPathPluginTest.java | 8 ++--
.../http/combination/CryptorRequestPluginTest.java | 12 ++---
.../combination/CryptorResponsePluginTest.java | 12 ++---
.../test/http/combination/JwtPluginTest.java | 12 ++---
.../http/combination/ModifyResponsePluginTest.java | 52 +++++++++++-----------
.../http/combination/ParamMappingPluginTest.java | 14 +++---
.../http/combination/RateLimiterPluginTest.java | 16 +++----
.../test/http/combination/RedirectPluginTest.java | 20 ++++-----
.../test/http/combination/RequestPluginTest.java | 16 +++----
.../test/http/combination/SentinelPluginTest.java | 16 +++----
.../test/http/combination/SignPluginTest.java | 14 +++---
.../test/http/combination/WafPluginTest.java | 16 +++----
.../test/https/HttpsDividePluginTest.java | 6 +--
.../integrated/test/motan/MotanPluginTest.java | 10 ++---
.../integrated/test/sofa/SofaPluginTest.java | 8 ++--
.../springcloud/SpringCloudPluginTest.java | 10 ++---
.../test/websocket/WebsocketPluginTest.java | 8 ++--
34 files changed, 211 insertions(+), 204 deletions(-)
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-jaeger/src/test/java/org/apache/shenyu/integrated/test/agent/jaeger/JaegerPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-jaeger/src/test/java/org/apache/shenyu/integrated/test/agent/jaeger/JaegerPluginTest.java
index f316390..f2ed751 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-jaeger/src/test/java/org/apache/shenyu/integrated/test/agent/jaeger/JaegerPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-jaeger/src/test/java/org/apache/shenyu/integrated/test/agent/jaeger/JaegerPluginTest.java
@@ -24,8 +24,8 @@ import
org.apache.shenyu.integrated.test.agent.jaeger.result.JaegerSpan;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.dto.OrderDTO;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,8 +34,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test for tracing Jaeger plugin.
@@ -48,7 +48,7 @@ public final class JaegerPluginTest extends
AbstractPluginDataInit {
private static final Gson GSON = new Gson();
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException, InterruptedException {
OrderDTO user = new OrderDTO("123", "Tom");
user = HttpHelper.INSTANCE.postGateway("/http/order/save", user,
OrderDTO.class);
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-opentelemetry/src/test/java/org/apache/shenyu/integrated/test/agent/opentelemetry/OpenTelemetryPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-opentelemetry/src/test/java/org/apache/shenyu/integrated/test/agent/opentelemetry/OpenTelemetryPluginTest.java
index 77408b7..24732a1 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-opentelemetry/src/test/java/org/apache/shenyu/integrated/test/agent/opentelemetry/OpenTelemetryPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-opentelemetry/src/test/java/org/apache/shenyu/integrated/test/agent/opentelemetry/OpenTelemetryPluginTest.java
@@ -17,25 +17,26 @@
package org.apache.shenyu.integrated.test.agent.opentelemetry;
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonParser;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
import org.apache.shenyu.integrated.test.agent.opentelemetry.result.JaegerSpan;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.dto.OrderDTO;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonParser;
/**
* Test for tracing OpenTelemetry plugin.
@@ -48,7 +49,7 @@ public final class OpenTelemetryPluginTest extends
AbstractPluginDataInit {
private static final Gson GSON = new Gson();
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException, InterruptedException {
OrderDTO user = new OrderDTO("123", "Tom");
user = HttpHelper.INSTANCE.postGateway("/http/order/save", user,
OrderDTO.class);
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-zipkin/src/test/java/org/apache/shenyu/integrated/test/agent/zipkin/ZipkinPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-zipkin/src/test/java/org/apache/shenyu/integrated/test/agent/zipkin/ZipkinPluginTest.java
index cd36a83..8d8796e 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-zipkin/src/test/java/org/apache/shenyu/integrated/test/agent/zipkin/ZipkinPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-agent/shenyu-integrated-test-agent-tracing/shenyu-integrated-test-agent-tracing-zipkin/src/test/java/org/apache/shenyu/integrated/test/agent/zipkin/ZipkinPluginTest.java
@@ -27,8 +27,8 @@ import
org.apache.shenyu.integrated.test.agent.zipkin.result.ZipkinSpan;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.dto.OrderDTO;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -36,9 +36,9 @@ import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonParser;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
/**
@@ -52,7 +52,7 @@ public class ZipkinPluginTest extends AbstractPluginDataInit {
private static final Gson GSON = new Gson();
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException, InterruptedException {
OrderDTO user = new OrderDTO("123", "Tom");
user = HttpHelper.INSTANCE.postGateway("/http/order/save", user,
OrderDTO.class);
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginMultiParamTest.java
b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginMultiParamTest.java
index aae3877..9689fab 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginMultiParamTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginMultiParamTest.java
@@ -17,13 +17,17 @@
package org.apache.shenyu.integrated.test.alibaba.dubbo;
-import com.google.common.collect.Lists;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.IntStream;
+
import org.apache.shenyu.common.enums.PluginEnum;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.dto.ComplexBeanTest;
@@ -36,16 +40,14 @@ import
org.apache.shenyu.integratedtest.common.dto.IdStringArrayRequest;
import org.apache.shenyu.integratedtest.common.dto.IdStringListRequest;
import org.apache.shenyu.integratedtest.common.dto.IdsAndNameRequest;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import com.google.common.collect.Lists;
public class AlibabaDubboPluginMultiParamTest extends AbstractPluginDataInit {
-
- @BeforeClass
+
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.DUBBO.getName(),
"{\"register\":\"zookeeper://shenyu-zk:2181\"}");
assertThat(pluginResult, is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginTest.java
index 635eb57..311d348 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-alibaba-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/AlibabaDubboPluginTest.java
@@ -17,24 +17,26 @@
package org.apache.shenyu.integrated.test.alibaba.dubbo;
-import com.google.gson.reflect.TypeToken;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
import java.io.IOException;
import java.util.List;
+
import org.apache.shenyu.common.enums.PluginEnum;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.dto.DubboTest;
import org.apache.shenyu.integratedtest.common.dto.ListResp;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import com.google.gson.reflect.TypeToken;
public class AlibabaDubboPluginTest extends AbstractPluginDataInit {
-
- @BeforeClass
+
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.DUBBO.getName(),
"{\"register\":\"zookeeper://shenyu-zk:2181\"}");
assertThat(pluginResult, is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginMultiParamTest.java
b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginMultiParamTest.java
index 9e637c1..0afd70a 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginMultiParamTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginMultiParamTest.java
@@ -36,16 +36,16 @@ import
org.apache.shenyu.integratedtest.common.dto.IdStringArrayRequest;
import org.apache.shenyu.integratedtest.common.dto.IdStringListRequest;
import org.apache.shenyu.integratedtest.common.dto.IdsAndNameRequest;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
public class ApacheDubboPluginMultiParamTest extends AbstractPluginDataInit {
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.DUBBO.getName(),
"{\"register\":\"zookeeper://shenyu-zk:2181\"}");
assertThat(pluginResult, is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginTest.java
index 30e47a0..7d8f203 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/src/test/java/org/apache/shenyu/integrated/test/alibaba/dubbo/ApacheDubboPluginTest.java
@@ -24,16 +24,16 @@ import
org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.dto.DubboTest;
import org.apache.shenyu.integratedtest.common.dto.ListResp;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
public class ApacheDubboPluginTest extends AbstractPluginDataInit {
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.DUBBO.getName(),
"{\"register\":\"zookeeper://shenyu-zk:2181\"}");
assertThat(pluginResult, is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/MultiRequestPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/MultiRequestPluginTest.java
index 03ddcd0..c879dd5 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/MultiRequestPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/MultiRequestPluginTest.java
@@ -18,7 +18,7 @@
package org.apache.shenyu.integrated.test.combination;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@@ -48,7 +48,7 @@ import
org.apache.shenyu.plugin.cryptor.handler.CryptorRuleHandler;
import org.apache.shenyu.plugin.cryptor.strategy.RsaStrategy;
import org.apache.shenyu.web.controller.LocalPluginController;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import com.google.common.reflect.TypeToken;
import com.google.gson.JsonObject;
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/RequestAndResponsePluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/RequestAndResponsePluginTest.java
index c510829..a63dcd1 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/RequestAndResponsePluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/RequestAndResponsePluginTest.java
@@ -29,7 +29,7 @@ import
org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.plugin.cryptor.handler.CryptorRuleHandler;
import org.apache.shenyu.plugin.cryptor.strategy.RsaStrategy;
import org.apache.shenyu.web.controller.LocalPluginController;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.ArrayList;
@@ -38,7 +38,7 @@ import java.util.Collections;
import java.util.List;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
/**
* The integrated test for combination plugins about request and response.
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/RpcAndRequestPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/RpcAndRequestPluginTest.java
index 7e565f3..2acdefc 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/RpcAndRequestPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/RpcAndRequestPluginTest.java
@@ -31,9 +31,9 @@ import
org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.plugin.cryptor.handler.CryptorRuleHandler;
import org.apache.shenyu.plugin.cryptor.strategy.RsaStrategy;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.Base64;
@@ -45,8 +45,8 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
/**
* The integrated test for combination plugins about request.
@@ -67,7 +67,7 @@ public final class RpcAndRequestPluginTest extends
AbstractPluginDataInit {
private static final Map<String, Object> DUBBO_REQUEST = new HashMap<>();
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String dubboPluginResult = initPlugin(PluginEnum.DUBBO.getName(),
"{\"register\":\"zookeeper://shenyu-zk:2181\"}");
assertThat(dubboPluginResult, is("success"));
@@ -216,7 +216,7 @@ public final class RpcAndRequestPluginTest extends
AbstractPluginDataInit {
assertThat(res, is("success"));
}
- @AfterClass
+ @AfterAll
public static void cleanAll() throws IOException {
String res = cleanPluginData(PluginEnum.DUBBO.getName());
assertThat(res, is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-grpc/src/test/java/org/apache/shenyu/integrated/test/grpc/GrpcPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-grpc/src/test/java/org/apache/shenyu/integrated/test/grpc/GrpcPluginTest.java
index 2081821..62469ea 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-grpc/src/test/java/org/apache/shenyu/integrated/test/grpc/GrpcPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-grpc/src/test/java/org/apache/shenyu/integrated/test/grpc/GrpcPluginTest.java
@@ -23,19 +23,19 @@ import org.apache.shenyu.common.enums.PluginEnum;
import org.apache.shenyu.common.utils.GsonUtils;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.Map;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
public class GrpcPluginTest extends AbstractPluginDataInit {
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.GRPC.getName(), "");
assertThat(pluginResult, is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/DividePluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/DividePluginTest.java
index 6b66db1..59b021d 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/DividePluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/DividePluginTest.java
@@ -20,9 +20,9 @@ package org.apache.shenyu.integrated.test.http;
import org.apache.shenyu.integratedtest.common.AbstractTest;
import org.apache.shenyu.integratedtest.common.dto.OrderDTO;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
public class DividePluginTest extends AbstractTest {
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/HttpTestControllerTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/HttpTestControllerTest.java
index a86e65b..c4612ca 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/HttpTestControllerTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/HttpTestControllerTest.java
@@ -26,7 +26,7 @@ import org.apache.shenyu.integratedtest.common.AbstractTest;
import org.apache.shenyu.integratedtest.common.dto.UserDTO;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.integratedtest.common.result.ResultBean;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.io.BufferedReader;
import java.io.File;
@@ -38,8 +38,8 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import static
org.springframework.http.MediaType.APPLICATION_OCTET_STREAM_VALUE;
import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE;
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/OrderControllerTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/OrderControllerTest.java
index e0aa56d..d191963 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/OrderControllerTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/OrderControllerTest.java
@@ -21,13 +21,13 @@ import org.apache.shenyu.integratedtest.common.AbstractTest;
import org.apache.shenyu.integratedtest.common.dto.OAuth2DTO;
import org.apache.shenyu.integratedtest.common.dto.OrderDTO;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
public final class OrderControllerTest extends AbstractTest {
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/RequestControllerTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/RequestControllerTest.java
index bada56c..283642b 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/RequestControllerTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/RequestControllerTest.java
@@ -20,15 +20,15 @@ package org.apache.shenyu.integrated.test.http;
import okhttp3.Response;
import org.apache.shenyu.integratedtest.common.AbstractTest;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
public final class RequestControllerTest extends AbstractTest {
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/ShenyuClientPathControllerTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/ShenyuClientPathControllerTest.java
index 4dea35fb..5788296 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/ShenyuClientPathControllerTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/ShenyuClientPathControllerTest.java
@@ -19,11 +19,11 @@ package org.apache.shenyu.integrated.test.http;
import org.apache.shenyu.integratedtest.common.AbstractTest;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
public final class ShenyuClientPathControllerTest extends AbstractTest {
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/SpringMvcMappingPathControllerTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/SpringMvcMappingPathControllerTest.java
index 6f83586..d241bf4 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/SpringMvcMappingPathControllerTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/SpringMvcMappingPathControllerTest.java
@@ -19,8 +19,8 @@ package org.apache.shenyu.integrated.test.http;
import org.apache.shenyu.integratedtest.common.AbstractTest;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.IOException;
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ContextPathPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ContextPathPluginTest.java
index 8d6cf3a..fdc1ad7 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ContextPathPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ContextPathPluginTest.java
@@ -27,8 +27,8 @@ import
org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.web.controller.LocalPluginController;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
import org.hamcrest.CoreMatchers;
-import org.junit.AfterClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.Collections;
@@ -36,7 +36,7 @@ import java.util.List;
import java.util.Map;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
public final class ContextPathPluginTest extends AbstractPluginDataInit {
@@ -86,7 +86,7 @@ public final class ContextPathPluginTest extends
AbstractPluginDataInit {
return conditionData;
}
- @AfterClass
+ @AfterAll
public static void clean() throws IOException {
cleanPluginData(PluginEnum.CONTEXT_PATH.getName());
restoreOriginalConfiguration();
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/CryptorRequestPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/CryptorRequestPluginTest.java
index e1ba997..0afb02f 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/CryptorRequestPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/CryptorRequestPluginTest.java
@@ -29,9 +29,9 @@ import
org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.plugin.cryptor.handler.CryptorRuleHandler;
import org.apache.shenyu.plugin.cryptor.strategy.RsaStrategy;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.ArrayList;
@@ -40,7 +40,7 @@ import java.util.List;
import java.util.Base64;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
public final class CryptorRequestPluginTest extends AbstractPluginDataInit {
@@ -58,7 +58,7 @@ public final class CryptorRequestPluginTest extends
AbstractPluginDataInit {
private static final RsaStrategy RSA_STRATEGY = new RsaStrategy();
- @Before
+ @BeforeEach
public void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.CRYPTOR_REQUEST.getName(),
null);
assertThat(pluginResult, is("success"));
@@ -129,7 +129,7 @@ public final class CryptorRequestPluginTest extends
AbstractPluginDataInit {
return ruleLocalData;
}
- @After
+ @AfterEach
public void clean() throws IOException {
String cleanResult =
cleanPluginData(PluginEnum.CRYPTOR_REQUEST.getName());
assertThat(cleanResult, is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/CryptorResponsePluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/CryptorResponsePluginTest.java
index d3d25d5..3b03e01 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/CryptorResponsePluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/CryptorResponsePluginTest.java
@@ -29,9 +29,9 @@ import
org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.plugin.cryptor.handler.CryptorRuleHandler;
import org.apache.shenyu.plugin.cryptor.strategy.RsaStrategy;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.ArrayList;
@@ -40,7 +40,7 @@ import java.util.Collections;
import java.util.List;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
public class CryptorResponsePluginTest extends AbstractPluginDataInit {
@@ -58,7 +58,7 @@ public class CryptorResponsePluginTest extends
AbstractPluginDataInit {
private static final RsaStrategy RSA_STRATEGY = new RsaStrategy();
- @Before
+ @BeforeEach
public void setup() throws IOException {
String pluginResult =
initPlugin(PluginEnum.CRYPTOR_RESPONSE.getName(), null);
assertThat(pluginResult, is("success"));
@@ -124,7 +124,7 @@ public class CryptorResponsePluginTest extends
AbstractPluginDataInit {
return ruleLocalData;
}
- @After
+ @AfterEach
public void clean() throws IOException {
String cleanResult =
cleanPluginData(PluginEnum.CRYPTOR_RESPONSE.getName());
assertThat(cleanResult, is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/JwtPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/JwtPluginTest.java
index e5038ed..342b64b 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/JwtPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/JwtPluginTest.java
@@ -26,9 +26,9 @@ import org.apache.shenyu.common.enums.PluginEnum;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.web.controller.LocalPluginController;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@@ -39,11 +39,11 @@ import java.util.List;
import java.util.Map;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
public final class JwtPluginTest extends AbstractPluginDataInit {
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.JWT.getName(),
"{\"secretKey\":\"key00000\"}");
assertThat(pluginResult, is("success"));
@@ -94,7 +94,7 @@ public final class JwtPluginTest extends
AbstractPluginDataInit {
return ruleLocalData;
}
- @AfterClass
+ @AfterAll
public static void clean() throws IOException {
cleanPluginData(PluginEnum.JWT.getName());
}
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ModifyResponsePluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ModifyResponsePluginTest.java
index 73fbc8a..6f3805f 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ModifyResponsePluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ModifyResponsePluginTest.java
@@ -17,11 +17,23 @@
package org.apache.shenyu.integrated.test.http.combination;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.gson.JsonObject;
-import okhttp3.Headers;
-import okhttp3.Response;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+
import org.apache.shenyu.common.dto.ConditionData;
import org.apache.shenyu.common.dto.convert.rule.impl.ModifyResponseRuleHandle;
import org.apache.shenyu.common.dto.convert.rule.impl.ParamMappingRuleHandle;
@@ -33,26 +45,16 @@ import org.apache.shenyu.common.utils.JsonUtils;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.web.controller.LocalPluginController;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Objects;
-import java.util.HashMap;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import com.google.gson.JsonObject;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertEquals;
+import okhttp3.Headers;
+import okhttp3.Response;
/**
* ModifyResponsePluginTest.
@@ -79,7 +81,7 @@ public final class ModifyResponsePluginTest extends
AbstractPluginDataInit {
private static final int EXCEPT_STATUS_CODE = 201;
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.MODIFY_RESPONSE.getName(),
"{\"ruleHandlerPageType\":\"custom\"}");
assertThat(pluginResult, is("success"));
@@ -136,7 +138,7 @@ public final class ModifyResponsePluginTest extends
AbstractPluginDataInit {
return ruleLocalData;
}
- @AfterClass
+ @AfterAll
public static void clean() throws IOException {
cleanPluginData(PluginEnum.MODIFY_RESPONSE.getName());
}
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ParamMappingPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ParamMappingPluginTest.java
index 5354610..41ea7ab 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ParamMappingPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/ParamMappingPluginTest.java
@@ -28,9 +28,9 @@ import org.apache.shenyu.integratedtest.common.dto.OrderDTO;
import org.apache.shenyu.integratedtest.common.dto.UserDTO;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.web.controller.LocalPluginController;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.Collections;
@@ -42,12 +42,12 @@ import java.util.Set;
import java.util.HashSet;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.hamcrest.MatcherAssert.assertThat;
public final class ParamMappingPluginTest extends AbstractPluginDataInit {
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.PARAM_MAPPING.getName(),
"{\"ruleHandlePageType\":\"custom\"}");
assertThat(pluginResult, is("success"));
@@ -116,7 +116,7 @@ public final class ParamMappingPluginTest extends
AbstractPluginDataInit {
return ruleLocalData;
}
- @AfterClass
+ @AfterAll
public static void clean() throws IOException {
cleanPluginData(PluginEnum.PARAM_MAPPING.getName());
}
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RateLimiterPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RateLimiterPluginTest.java
index dd3f78d..0a9f224 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RateLimiterPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RateLimiterPluginTest.java
@@ -29,9 +29,9 @@ import
org.apache.shenyu.integratedtest.common.dto.AdminResponse;
import org.apache.shenyu.integratedtest.common.dto.UserDTO;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.ArrayList;
@@ -41,13 +41,13 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertTrue;
public final class RateLimiterPluginTest extends AbstractPluginDataInit {
- @Before
+ @BeforeEach
public void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.RATE_LIMITER.getName(),
"{\"mode\":\"standalone\",\"master\":\"mymaster\",\"url\":\"shenyu-redis:6379\",\"password\":\"abc\"}");
assertThat(pluginResult, is("success"));
@@ -168,7 +168,7 @@ public final class RateLimiterPluginTest extends
AbstractPluginDataInit {
return Collections.singletonList(ruleLocalData);
}
- @After
+ @AfterEach
public void clean() throws IOException {
String res = cleanPluginData(PluginEnum.RATE_LIMITER.getName());
assertThat(res, is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RedirectPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RedirectPluginTest.java
index b8ee90e..8178ee4 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RedirectPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RedirectPluginTest.java
@@ -26,9 +26,9 @@ import org.apache.shenyu.common.utils.JsonUtils;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.ArrayList;
@@ -37,15 +37,15 @@ import java.util.List;
import java.util.Map;
import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.hamcrest.MatcherAssert.assertThat;
public final class RedirectPluginTest extends AbstractPluginDataInit {
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.REDIRECT.getName(), "");
assertThat(pluginResult, is("success"));
@@ -114,7 +114,7 @@ public final class RedirectPluginTest extends
AbstractPluginDataInit {
return conditionData;
}
- @AfterClass
+ @AfterAll
public static void clean() throws IOException {
cleanPluginData(PluginEnum.REDIRECT.getName());
}
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RequestPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RequestPluginTest.java
index 810be09..53c611b 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RequestPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/RequestPluginTest.java
@@ -27,9 +27,9 @@ import org.apache.shenyu.common.utils.JsonUtils;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.HttpCookie;
@@ -40,13 +40,13 @@ import java.util.Map;
import java.util.ArrayList;
import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
public final class RequestPluginTest extends AbstractPluginDataInit {
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.REQUEST.getName(), null);
assertThat(pluginResult, is("success"));
@@ -123,7 +123,7 @@ public final class RequestPluginTest extends
AbstractPluginDataInit {
return ruleLocalData;
}
- @AfterClass
+ @AfterAll
public static void clean() throws IOException {
cleanPluginData(PluginEnum.REQUEST.getName());
}
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/SentinelPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/SentinelPluginTest.java
index 03b185c..ccea34e 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/SentinelPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/SentinelPluginTest.java
@@ -18,9 +18,9 @@
package org.apache.shenyu.integrated.test.http.combination;
import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.hamcrest.MatcherAssert.assertThat;
import java.io.IOException;
import java.lang.reflect.Type;
@@ -37,9 +37,9 @@ import org.apache.shenyu.common.utils.JsonUtils;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import com.google.common.collect.Lists;
import com.google.gson.reflect.TypeToken;
@@ -48,7 +48,7 @@ public final class SentinelPluginTest extends
AbstractPluginDataInit {
private static final String TEST_SENTINEL_PATH =
"/http/test/sentinel/pass";
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.SENTINEL.getName(),
"{\"model\":\"black\"}");
assertThat(pluginResult, is("success"));
@@ -102,7 +102,7 @@ public final class SentinelPluginTest extends
AbstractPluginDataInit {
return Lists.newArrayList(ruleLocalData);
}
- @AfterClass
+ @AfterAll
public static void clean() throws IOException {
cleanPluginData(PluginEnum.SENTINEL.getName());
}
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/SignPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/SignPluginTest.java
index a8e7b4c..955bac1 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/SignPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/SignPluginTest.java
@@ -31,9 +31,9 @@ import
org.apache.shenyu.integratedtest.common.dto.AdminResponse;
import org.apache.shenyu.integratedtest.common.dto.UserDTO;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.time.LocalDateTime;
@@ -43,8 +43,8 @@ import java.util.List;
import java.util.Map;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
public final class SignPluginTest extends AbstractPluginDataInit {
@@ -52,7 +52,7 @@ public final class SignPluginTest extends
AbstractPluginDataInit {
private static final String APP_SECRET =
"061521A73DD94A3FA873C25D050685BB";
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String authResult = initAuthData(APP_KEY, APP_SECRET,
buildAuthParamDataList(), buildAuthPathDataList());
assertThat(authResult, is("success"));
@@ -159,7 +159,7 @@ public final class SignPluginTest extends
AbstractPluginDataInit {
return Collections.singletonList(ruleLocalData);
}
- @AfterClass
+ @AfterAll
public static void clean() throws IOException {
cleanPluginData(PluginEnum.SIGN.getName());
cleanAuthData(APP_KEY);
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/WafPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/WafPluginTest.java
index 3024ce9..dff409f 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/WafPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-http/src/test/java/org/apache/shenyu/integrated/test/http/combination/WafPluginTest.java
@@ -19,9 +19,9 @@ package org.apache.shenyu.integrated.test.http.combination;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.hamcrest.MatcherAssert.assertThat;
import java.io.IOException;
import java.util.ArrayList;
@@ -39,13 +39,13 @@ import org.apache.shenyu.common.utils.JsonUtils;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
public final class WafPluginTest extends AbstractPluginDataInit {
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.WAF.getName(),
"{\"model\":\"black\"}");
assertThat(pluginResult, is("success"));
@@ -92,7 +92,7 @@ public final class WafPluginTest extends
AbstractPluginDataInit {
return ruleLocalData;
}
- @AfterClass
+ @AfterAll
public static void clean() throws IOException {
cleanPluginData(PluginEnum.WAF.getName());
}
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-https/src/test/java/org/apache/shenyu/integrated/test/https/HttpsDividePluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-https/src/test/java/org/apache/shenyu/integrated/test/https/HttpsDividePluginTest.java
index 742cd26..185e137 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-https/src/test/java/org/apache/shenyu/integrated/test/https/HttpsDividePluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-https/src/test/java/org/apache/shenyu/integrated/test/https/HttpsDividePluginTest.java
@@ -19,12 +19,12 @@ package org.apache.shenyu.integrated.test.https;
import org.apache.shenyu.integratedtest.common.AbstractTest;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.util.Map;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
public final class HttpsDividePluginTest extends AbstractTest {
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-motan/src/test/java/org/apache/shenyu/integrated/test/motan/MotanPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-motan/src/test/java/org/apache/shenyu/integrated/test/motan/MotanPluginTest.java
index 70fdf36..0868c1b 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-motan/src/test/java/org/apache/shenyu/integrated/test/motan/MotanPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-motan/src/test/java/org/apache/shenyu/integrated/test/motan/MotanPluginTest.java
@@ -22,19 +22,19 @@ import org.apache.shenyu.common.enums.PluginEnum;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.dto.MotanDTO;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.lang.reflect.Type;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
public class MotanPluginTest extends AbstractPluginDataInit {
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.MOTAN.getName(),
"{\"register\":\"shenyu-zk:2181\"}");
assertThat(pluginResult, is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-sofa/src/test/java/org/apache/shenyu/integrated/test/sofa/SofaPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-sofa/src/test/java/org/apache/shenyu/integrated/test/sofa/SofaPluginTest.java
index dff7256..6b027d3 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-sofa/src/test/java/org/apache/shenyu/integrated/test/sofa/SofaPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-sofa/src/test/java/org/apache/shenyu/integrated/test/sofa/SofaPluginTest.java
@@ -23,17 +23,17 @@ import
org.apache.shenyu.integrated.test.sofa.dto.SofaTestData;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
import org.hamcrest.Matchers;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
public class SofaPluginTest extends AbstractPluginDataInit {
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.SOFA.getName(),
"{\"protocol\":\"zookeeper\",\"register\":\"shenyu-zk:2181\"}");
assertThat(pluginResult, Matchers.is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-spring-cloud/src/test/java/org/apache/shenyu/integratedtest/springcloud/SpringCloudPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-spring-cloud/src/test/java/org/apache/shenyu/integratedtest/springcloud/SpringCloudPluginTest.java
index b04fb62..2d61bed 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-spring-cloud/src/test/java/org/apache/shenyu/integratedtest/springcloud/SpringCloudPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-spring-cloud/src/test/java/org/apache/shenyu/integratedtest/springcloud/SpringCloudPluginTest.java
@@ -21,18 +21,18 @@ import org.apache.shenyu.common.enums.PluginEnum;
import org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.integratedtest.common.dto.OrderDTO;
import org.apache.shenyu.integratedtest.common.helper.HttpHelper;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
public class SpringCloudPluginTest extends AbstractPluginDataInit {
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.SPRING_CLOUD.getName(),
"");
assertThat(pluginResult, is("success"));
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-websocket/src/test/java/org/apache/shenyu/integrated/test/websocket/WebsocketPluginTest.java
b/shenyu-integrated-test/shenyu-integrated-test-websocket/src/test/java/org/apache/shenyu/integrated/test/websocket/WebsocketPluginTest.java
index 6615946..8376a95 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-websocket/src/test/java/org/apache/shenyu/integrated/test/websocket/WebsocketPluginTest.java
+++
b/shenyu-integrated-test/shenyu-integrated-test-websocket/src/test/java/org/apache/shenyu/integrated/test/websocket/WebsocketPluginTest.java
@@ -28,8 +28,8 @@ import
org.apache.shenyu.integratedtest.common.AbstractPluginDataInit;
import org.apache.shenyu.web.controller.LocalPluginController.RuleLocalData;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -42,7 +42,7 @@ import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.TimeUnit;
import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
public class WebsocketPluginTest extends AbstractPluginDataInit {
@@ -50,7 +50,7 @@ public class WebsocketPluginTest extends
AbstractPluginDataInit {
private static final String WEBSOCKET_URI =
"ws://localhost:9195/websocket";
- @BeforeClass
+ @BeforeAll
public static void setup() throws IOException {
String pluginResult = initPlugin(PluginEnum.WEB_SOCKET.getName(),
"{\"multiSelectorHandle\":\"1\"}");
assertThat(pluginResult, is("success"));