You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/08/28 15:55:12 UTC

[dubbo] branch 3.0-multi-instances updated: Fix ut in ConfigManagerTest

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

albumenj pushed a commit to branch 3.0-multi-instances
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.0-multi-instances by this push:
     new 2566422  Fix ut in ConfigManagerTest
2566422 is described below

commit 25664227cda32cbe17ee83b620a74ffd3d276ec3
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Sat Aug 28 23:54:53 2021 +0800

    Fix ut in ConfigManagerTest
---
 .../test/java/org/apache/dubbo/config/context/ConfigManagerTest.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dubbo-common/src/test/java/org/apache/dubbo/config/context/ConfigManagerTest.java b/dubbo-common/src/test/java/org/apache/dubbo/config/context/ConfigManagerTest.java
index e05c864..5d703a1 100644
--- a/dubbo-common/src/test/java/org/apache/dubbo/config/context/ConfigManagerTest.java
+++ b/dubbo-common/src/test/java/org/apache/dubbo/config/context/ConfigManagerTest.java
@@ -25,8 +25,8 @@ import org.apache.dubbo.config.MonitorConfig;
 import org.apache.dubbo.config.ProtocolConfig;
 import org.apache.dubbo.config.ProviderConfig;
 import org.apache.dubbo.config.RegistryConfig;
-
 import org.apache.dubbo.rpc.model.ApplicationModel;
+
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -274,6 +274,7 @@ public class ConfigManagerTest {
             // test override mode
             System.setProperty(DUBBO_CONFIG_MODE, ConfigMode.OVERRIDE.name());
             ApplicationModel.reset();
+            configManager = ApplicationModel.defaultModel().getConfigManager();
             Assertions.assertEquals(ConfigMode.OVERRIDE, configManager.getConfigMode());
 
             configManager.addConfig(applicationConfig1);
@@ -284,6 +285,7 @@ public class ConfigManagerTest {
             // test ignore mode
             System.setProperty(DUBBO_CONFIG_MODE, ConfigMode.IGNORE.name());
             ApplicationModel.reset();
+            configManager = ApplicationModel.defaultModel().getConfigManager();
             Assertions.assertEquals(ConfigMode.IGNORE, configManager.getConfigMode());
 
             configManager.addConfig(applicationConfig1);