epugh commented on code in PR #4154:
URL: https://github.com/apache/solr/pull/4154#discussion_r2897154869
##########
solr/core/src/java/org/apache/solr/cli/CLIUtils.java:
##########
@@ -311,10 +309,11 @@ public static boolean safeCheckCollectionExists(
String solrUrl, String collection, String credentials) {
boolean exists = false;
try (var solrClient = getSolrClient(solrUrl, credentials)) {
- NamedList<Object> existsCheckResult = solrClient.request(new
CollectionAdminRequest.List());
- @SuppressWarnings("unchecked")
- List<String> collections = (List<String>)
existsCheckResult.get("collections");
- exists = collections != null && collections.contains(collection);
+ var response = new CollectionsApi.ListCollections().process(solrClient);
Review Comment:
Okay, I just merged in the main branch with the new fix... I don't
really want to litter our tests with a whole bunch of tests on "do we handle it
when the api throws an exception"... wiht your other work, can we call this
as good?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]