mcvsubbu commented on a change in pull request #4560: Refactor
toggleInstanceState API
URL: https://github.com/apache/incubator-pinot/pull/4560#discussion_r328857991
##########
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:
I found it useful to quote user input so that we can identify cases where
the user may have input a bunch of spaces or null string. In that case, the log
will show **Failed to toggle instance state: ' '** as opposed to **Failed to
toggle instance state: **.
But yes, we should not need the back-slash
----------------------------------------------------------------
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]