tests: add a short poll

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1567663 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2014-02-12 16:01:41 +00:00
parent 98810d1f54
commit 232cf38bdf
1 changed files with 10 additions and 0 deletions

View File

@ -198,6 +198,16 @@ public class StressHdfsTest extends BasicDistributedZkTest {
request.setPath("/admin/collections");
cloudClient.request(request);
long timeout = System.currentTimeMillis() + 10000;
while (cloudClient.getZkStateReader().getClusterState().hasCollection(DELETE_DATA_DIR_COLLECTION)) {
if (System.currentTimeMillis() > timeout) {
throw new AssertionError("Timeout waiting to see removed collection leave clusterstate");
}
Thread.sleep(200);
cloudClient.getZkStateReader().updateClusterState(true);
}
// check that all dirs are gone
for (String dataDir : dataDirs) {
Configuration conf = new Configuration();