jackjlli commented on a change in pull request #4560: Refactor 
toggleInstanceState API
URL: https://github.com/apache/incubator-pinot/pull/4560#discussion_r329247515
 
 

 ##########
 File path: 
pinot-controller/src/test/java/org/apache/pinot/controller/helix/ControllerInstanceToggleTest.java
 ##########
 @@ -104,9 +107,21 @@ public void testInstanceToggle()
             .getPartitionSet().size(), 0);
   }
 
+  private void toggleInstanceState(String instanceName, String state) {
+    TestUtils.waitForCondition(aVoid -> {
+      try {
+        
sendPostRequest(_controllerRequestURLBuilder.forInstanceState(instanceName), 
state);
+      } catch (IOException ioe) {
+        // receive non-200 status code
+        return false;
+      }
+      return true;
+    }, TIMEOUT_MS, "Failed to toggle instance state: \'" + state + "\' for 
instance: " + instanceName);
 
 Review comment:
   Back-slash removed.

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