jeho0815 commented on a change in pull request #1326: merge dimension items 
according to priority.
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1326#discussion_r324405439
 
 

 ##########
 File path: 
dynamic-config/config-cc/src/test/java/org/apache/servicecomb/config/client/TestParseConfigUtils.java
 ##########
 @@ -80,4 +81,26 @@ public void testNotifyItemsChangedNeedRefresh() {
     }
     Assert.assertTrue(status);
   }
+  
+  @Test
+  public void testMergeDimensionItems() {
+
+    boolean status = true;
+    Map<String, Object> application = new HashMap<>();
+       Map<String, Object> service = new HashMap<>();
+       Map<String, Object> version = new HashMap<>();
+       Map<String, Object> tag = new HashMap<>();
+
+       Map<String, Map<String, Object>> items = new LinkedHashMap<String, 
Map<String, Object>>();
+       items.put("application", application);
+       items.put("service@app", service);
+       items.put("service@app#version", version);
+       items.put("service@app#version!tag", tag);
+    try {
+      Deencapsulation.invoke(pc, "mergeDimensionItems", items);
+    } catch (Exception e) {
+      status = false;
+    }
+    Assert.assertTrue(status);
 
 Review comment:
   the dimentions should be out of order and  you can add some key/values and , 
then check the merged result

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to