SOLR-8048: Stop using deprecated CollectionAdminRequest.Reload constructor

This commit is contained in:
Shalin Shekhar Mangar 2016-07-05 12:53:35 +05:30
parent 2d6b7ea966
commit 8653be9a5b
1 changed files with 3 additions and 6 deletions

View File

@ -153,8 +153,7 @@ public class BasicAuthIntegrationTest extends TestMiniSolrCloudClusterBase {
("name", "collection-admin-edit", "role", "admin"))), "harry", "HarryIsUberCool" );
verifySecurityStatus(cl, baseUrl + authzPrefix, "authorization/permissions[2]/name", "collection-admin-edit", 20);
CollectionAdminRequest.Reload reload = new CollectionAdminRequest.Reload();
reload.setCollectionName(defaultCollName);
CollectionAdminRequest.Reload reload = CollectionAdminRequest.reloadCollection(defaultCollName);
try (HttpSolrClient solrClient = getHttpSolrClient(baseUrl)) {
try {
@ -171,13 +170,11 @@ public class BasicAuthIntegrationTest extends TestMiniSolrCloudClusterBase {
}
}
cloudSolrClient.request(new CollectionAdminRequest.Reload()
.setCollectionName(defaultCollName)
cloudSolrClient.request(CollectionAdminRequest.reloadCollection(defaultCollName)
.setBasicAuthCredentials("harry", "HarryIsUberCool"));
try {
cloudSolrClient.request(new CollectionAdminRequest.Reload()
.setCollectionName(defaultCollName)
cloudSolrClient.request(CollectionAdminRequest.reloadCollection(defaultCollName)
.setBasicAuthCredentials("harry", "Cool12345"));
fail("This should not succeed");
} catch (HttpSolrClient.RemoteSolrException e) {