try {
setAuthenticationUser(solrUserName);
QueryRequest request = populateCollectionAdminParams(adminOp, collectionName);
SolrServer solrServer = createNewSolrServer("", getBaseUrl((HttpSolrServer) clients.get(0)));
try {
NamedList<Object> result = solrServer.request(request);
if (adminOp.compareTo(CollectionAction.CREATE) == 0) {
// Wait for collection creation to complete.
waitForRecoveriesToFinish(collectionName, false);
}
} finally {