final String indexName = "index" + i;
IIndexDeployFuture deployFuture = deployClient.addIndex(indexName, INDEX_FILE.getAbsolutePath(), 1);
zkClient.getEventLock().lock();
zkClient.process(event);
zkClient.getEventLock().unlock();
IndexState indexState = deployFuture.joinDeployment();
assertEquals("" + deployClient.getIndexMetaData(indexName).getDeployError(), IndexState.DEPLOYED, indexState);
if (indexState == IndexState.ERROR) {
IndexDeployError deployError = protocol.getIndexMD(indexName).getDeployError();
Set<Shard> shards = protocol.getIndexMD(indexName).getShards();