You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/08/23 23:51:44 UTC

[GitHub] [incubator-pinot] jackjlli commented on a change in pull request #4560: Fix flaky ControllerInstanceToggleTest

jackjlli commented on a change in pull request #4560: Fix flaky ControllerInstanceToggleTest
URL: https://github.com/apache/incubator-pinot/pull/4560#discussion_r317332807
 
 

 ##########
 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'm logging `'` instead of `\`. Here's the simple program:
   ```
     public static void main(String[] args) {
       System.out.println("\'");
       System.out.println("'");
     }
   ```
   Output:
   ```
   '
   '
   ```
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org