pkuwm commented on a change in pull request #339: Implementation of 
stateModelDef modification in REST 2.0
URL: https://github.com/apache/helix/pull/339#discussion_r305560790
 
 

 ##########
 File path: 
helix-rest/src/test/java/org/apache/helix/rest/server/TestClusterAccessor.java
 ##########
 @@ -405,7 +407,68 @@ public void 
testEnableDisableMaintenanceModeWithCustomFields() {
         
accessor.getBaseDataAccessor().exists(accessor.keyBuilder().maintenance().getPath(),
 0));
   }
 
-  @Test()
+  @Test(dependsOnMethods = "testEnableDisableMaintenanceModeWithCustomFields")
+  public void testGetStateModelDef() throws IOException {
+
+    System.out.println("Start test :" + TestHelper.getTestMethodName());
+    String cluster = "TestCluster_1";
+    String stateModelDefs = get("clusters/" + cluster + "/statemodeldefs", 
null, Response.Status.OK.getStatusCode(), true);
 
 Review comment:
   It seems you are using multiple times for "clusters/" + cluster + 
"/statemodeldefs/". Would it be better to declare a var like 
clusterStateModelDefUri = "clusters/" + cluster + "/statemodeldefs/": avoid 
creating multiple string objects in Java.  
   Update: Reviewed again. I am wrong about creating multiple string objects. 
"+" would call StringBuilder actually and so in this case "+" won't create more 
string objects.  But regarding readability, it might be good to create on 
string var for clusterStateModelDefUri = "clusters/" + cluster + 
"/statemodeldefs/"?

----------------------------------------------------------------
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