You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/10/30 06:47:39 UTC

[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2628: Use final to clear the test property

liubao68 commented on a change in pull request #2628:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2628#discussion_r739617839



##########
File path: transports/transport-rest/transport-rest-vertx/src/test/java/org/apache/servicecomb/transport/rest/vertx/TestTransportConfig.java
##########
@@ -63,174 +67,252 @@ int availableProcessors() {
 
   @Test
   public void testGetThreadCountNormal() {
-    ArchaiusUtils.setProperty("servicecomb.rest.server.thread-count", 10);
-    Assert.assertEquals(10, TransportConfig.getThreadCount());
+    try {
+      ArchaiusUtils.setProperty("servicecomb.rest.server.thread-count", 10);
+      Assert.assertEquals(10, TransportConfig.getThreadCount());
+    } finally {
+      ArchaiusUtils.setProperty("servicecomb.rest.server.thread-count", null);
+    }

Review comment:
         @After
     public void after() {
       ArchaiusUtils.resetConfig();
     }
   
   
   May have done the job, do you find any problem this do not have this change?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org