You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by me...@apache.org on 2020/05/06 04:25:54 UTC

[dubbo] branch master updated: 1、configuration.publishConfig returns false,without throw exception (#6094)

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

mercyblitz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new b2e6d51  1、configuration.publishConfig returns false,without throw exception (#6094)
b2e6d51 is described below

commit b2e6d512e328c41d3756d9e324bd2b4499b8a3e0
Author: imuxi <33...@users.noreply.github.com>
AuthorDate: Wed May 6 12:25:37 2020 +0800

    1、configuration.publishConfig returns false,without throw exception (#6094)
    
    * 1、configuration.publishConfig returns false,without throw exception
    
    * 1、configuration.getConfigKeys returns empty-list,without throw exception
---
 .../config/configcenter/AbstractDynamicConfigurationTest.java     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/dubbo-common/src/test/java/org/apache/dubbo/common/config/configcenter/AbstractDynamicConfigurationTest.java b/dubbo-common/src/test/java/org/apache/dubbo/common/config/configcenter/AbstractDynamicConfigurationTest.java
index 00d58f6..4f2f700 100644
--- a/dubbo-common/src/test/java/org/apache/dubbo/common/config/configcenter/AbstractDynamicConfigurationTest.java
+++ b/dubbo-common/src/test/java/org/apache/dubbo/common/config/configcenter/AbstractDynamicConfigurationTest.java
@@ -33,6 +33,8 @@ import static org.apache.dubbo.common.config.configcenter.AbstractDynamicConfigu
 import static org.apache.dubbo.common.config.configcenter.AbstractDynamicConfiguration.THREAD_POOL_PREFIX_PARAM_NAME;
 import static org.apache.dubbo.common.config.configcenter.AbstractDynamicConfiguration.THREAD_POOL_SIZE_PARAM_NAME;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
@@ -105,13 +107,13 @@ public class AbstractDynamicConfigurationTest {
 
     @Test
     public void testPublishConfig() {
-        assertThrows(UnsupportedOperationException.class, () -> configuration.publishConfig(null, null), "No support");
-        assertThrows(UnsupportedOperationException.class, () -> configuration.publishConfig(null, null, null), "No support");
+        assertFalse(configuration.publishConfig(null, null));
+        assertFalse(configuration.publishConfig(null, null, null));
     }
 
     @Test
     public void testGetConfigKeys() {
-        assertThrows(UnsupportedOperationException.class, () -> configuration.getConfigKeys(null), "No support");
+        assertTrue(configuration.getConfigKeys(null).isEmpty());
     }
 
     @Test