NealSun96 commented on a change in pull request #844: Implement setRoutingData 
for MetadataStoreDirectoryService
URL: https://github.com/apache/helix/pull/844#discussion_r387232460
 
 

 ##########
 File path: 
helix-rest/src/test/java/org/apache/helix/rest/server/TestMetadataStoreDirectoryAccessor.java
 ##########
 @@ -452,6 +454,43 @@ public void testDeleteShardingKey() throws 
InvalidRoutingDataException {
     Assert.assertEquals(getAllShardingKeysInTestRealm1(), 
expectedShardingKeysSet);
   }
 
+  @Test(dependsOnMethods = "testDeleteShardingKey")
+  public void testSetRoutingData() throws InvalidRoutingDataException, 
IOException {
+    Map<String, List<String>> routingData = new HashMap<>();
+    routingData.put(TEST_REALM_1, TEST_SHARDING_KEYS_2);
+    routingData.put(TEST_REALM_2, TEST_SHARDING_KEYS_1);
+    String routingDataString = new 
ObjectMapper().writeValueAsString(routingData);
+
+    Map<String, String> badFormatRoutingData = new HashMap<>();
+    badFormatRoutingData.put(TEST_REALM_1, TEST_REALM_2);
+    badFormatRoutingData.put(TEST_REALM_2, TEST_REALM_1);
+    String badFormatRoutingDataString = new 
ObjectMapper().writeValueAsString(badFormatRoutingData);
 
 Review comment:
   Reusing the inherited `OBJECT_MAPPER`. Applies to many other files as well. 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to