mirror of https://github.com/apache/lucene.git
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:
parent
98810d1f54
commit
232cf38bdf
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue