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

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new 77e52ceec [SCB-2655] migrate handler-flowcontrol-qps module to junit5 
(#3250)
77e52ceec is described below

commit 77e52ceecf898f10e8c8b8823e2e620497c7f0e2
Author: TingTing Wang <[email protected]>
AuthorDate: Mon Aug 1 14:06:42 2022 +0800

    [SCB-2655] migrate handler-flowcontrol-qps module to junit5 (#3250)
---
 .../org/apache/servicecomb/qps/QpsControllerManagerTest.java   | 10 +++++-----
 .../servicecomb/qps/TestConsumerQpsFlowControlHandler.java     | 10 +++++-----
 .../servicecomb/qps/TestProviderQpsFlowControlHandler.java     | 10 +++++-----
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git 
a/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/QpsControllerManagerTest.java
 
b/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/QpsControllerManagerTest.java
index de2ee8e77..8554968aa 100644
--- 
a/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/QpsControllerManagerTest.java
+++ 
b/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/QpsControllerManagerTest.java
@@ -22,20 +22,20 @@ import org.apache.servicecomb.core.definition.OperationMeta;
 import org.apache.servicecomb.core.definition.SchemaMeta;
 import org.apache.servicecomb.foundation.test.scaffolding.config.ArchaiusUtils;
 import org.apache.servicecomb.qps.strategy.AbstractQpsStrategy;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.Mockito;
 
 public class QpsControllerManagerTest {
 
-  @Before
+  @BeforeEach
   public void beforeTest() {
     ArchaiusUtils.resetConfig();
   }
 
-  @After
+  @AfterEach
   public void afterTest() {
     ArchaiusUtils.resetConfig();
   }
diff --git 
a/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/TestConsumerQpsFlowControlHandler.java
 
b/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/TestConsumerQpsFlowControlHandler.java
index f6701f213..64331fe67 100644
--- 
a/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/TestConsumerQpsFlowControlHandler.java
+++ 
b/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/TestConsumerQpsFlowControlHandler.java
@@ -27,10 +27,10 @@ import 
org.apache.servicecomb.qps.strategy.FixedWindowStrategy;
 import org.apache.servicecomb.swagger.invocation.AsyncResponse;
 import org.apache.servicecomb.swagger.invocation.exception.CommonExceptionData;
 import org.apache.servicecomb.swagger.invocation.exception.InvocationException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
 
@@ -44,14 +44,14 @@ public class TestConsumerQpsFlowControlHandler {
 
   OperationMeta operationMeta = Mockito.mock(OperationMeta.class);
 
-  @Before
+  @BeforeEach
   public void setUP() {
     ArchaiusUtils.resetConfig();
     handler = new ConsumerQpsFlowControlHandler();
   }
 
 
-  @After
+  @AfterEach
   public void afterTest() {
     ArchaiusUtils.resetConfig();
   }
diff --git 
a/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/TestProviderQpsFlowControlHandler.java
 
b/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/TestProviderQpsFlowControlHandler.java
index bfaa8fb99..26fa9be9b 100644
--- 
a/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/TestProviderQpsFlowControlHandler.java
+++ 
b/handlers/handler-flowcontrol-qps/src/test/java/org/apache/servicecomb/qps/TestProviderQpsFlowControlHandler.java
@@ -26,10 +26,10 @@ import 
org.apache.servicecomb.qps.strategy.FixedWindowStrategy;
 import org.apache.servicecomb.swagger.invocation.AsyncResponse;
 import org.apache.servicecomb.swagger.invocation.exception.CommonExceptionData;
 import org.apache.servicecomb.swagger.invocation.exception.InvocationException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
 
@@ -40,14 +40,14 @@ public class TestProviderQpsFlowControlHandler {
 
   AsyncResponse asyncResp = Mockito.mock(AsyncResponse.class);
 
-  @Before
+  @BeforeEach
   public void setUP() {
     ArchaiusUtils.resetConfig();
     handler = new ProviderQpsFlowControlHandler();
     ArchaiusUtils.setProperty(Config.PROVIDER_LIMIT_KEY_PREFIX + "test", 1);
   }
 
-  @After
+  @AfterEach
   public void afterTest() {
     ArchaiusUtils.resetConfig();
   }

Reply via email to