}
private void checkDeployError(ErrorType errorType, int shardCount) throws Exception {
// check results
assertEquals(1, _protocol.getIndices().size());
IndexMetaData indexMD = _protocol.getIndexMD(_indexName);
assertNotNull(indexMD);
assertTrue(indexMD.hasDeployError());
IndexDeployError error = indexMD.getDeployError();
assertNotNull(error);
assertEquals(errorType, error.getErrorType());
Set<Shard> shards = indexMD.getShards();
assertEquals(shardCount, shards.size());
for (Shard shard : shards) {
assertTrue(_protocol.getShardNodes(shard.getName()).isEmpty());
}
}