SOLR-8048: Stop using deprecated CollectionAdminRequest.Reload constructor

(cherry picked from commit 8653be9)
This commit is contained in:
Shalin Shekhar Mangar 2016-07-05 12:53:35 +05:30
parent 31316f7682
commit 119ea15ad6
1 changed files with 3 additions and 6 deletions

View File

@ -154,8 +154,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 {
@ -172,13 +171,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) {