You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pinot.apache.org by GitBox <gi...@apache.org> on 2019/01/08 22:17:05 UTC

[GitHub] sunithabeeram commented on a change in pull request #3667: Try fixing flaky tests by adding 0.5s sleep

sunithabeeram commented on a change in pull request #3667: Try fixing flaky tests by adding 0.5s sleep
URL: https://github.com/apache/incubator-pinot/pull/3667#discussion_r246171397
 
 

 ##########
 File path: pinot-controller/src/test/java/com/linkedin/pinot/controller/api/resources/PinotInstanceRestletResourceTest.java
 ##########
 @@ -63,6 +63,9 @@ public void testInstanceListingAndCreation() throws Exception {
     serverInstance.put("host", "2.3.4.5");
     sendPostRequest(_controllerRequestURLBuilder.forInstanceCreate(), serverInstance.toString());
 
+    // Sleep 0.5s for cache accessor to update cache.
+    Thread.sleep(500L);
 
 Review comment:
   Is the sleep required only here?
   
   Also, a better pattern might be to use TestUtils.waitForCondition instead of a simple sleep if we are to wait on results of asynchronous operations to get reflected.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: dev-unsubscribe@pinot.apache.org
For additional commands, e-mail: dev-help@pinot.apache.org