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/10/04 17:40:39 UTC
[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull
request #4678: Use guava cache for instance admin endpoints
Jackie-Jiang commented on a change in pull request #4678: Use guava cache for instance admin endpoints
URL: https://github.com/apache/incubator-pinot/pull/4678#discussion_r331612463
##########
File path: pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManagerTest.java
##########
@@ -173,24 +172,18 @@ private void addAndRemoveNewInstanceConfig(ZkClient zkClient)
ZNRecord znRecord = new ZNRecord(instanceName);
zkClient.createPersistent(instanceConfigPath, znRecord);
- List<String> latestAllInstances = _helixResourceManager.getAllInstances();
- long maxTime = System.currentTimeMillis() + MAX_TIMEOUT_IN_MILLISECOND;
- while (!latestAllInstances.contains(instanceName) && System.currentTimeMillis() < maxTime) {
- Thread.sleep(100L);
- latestAllInstances = _helixResourceManager.getAllInstances();
- }
- Assert.assertTrue(System.currentTimeMillis() < maxTime, "Timeout when waiting for adding instance config");
+ TestUtils.waitForCondition(aVoid -> {
Review comment:
We don't need to wait for condition right?
----------------------------------------------------------------
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