epugh commented on PR #1256:
URL: https://github.com/apache/solr/pull/1256#issuecomment-1367461056

   Okay, now I need some ideas @stillalex @dsmiley....   I've migrated to the 
Builder all the examples where we create a new SolrCloudClient, so it's easy to 
add the builder logic.   The remaining ones all basically are reusing a 
SolrClient inherited from the base test class.   For example, in 
`TestTrackingShardHandlerFactory` we have the method:
   
   ```
   cluster.getSolrClient().setDefaultCollection(COLLECTION);
   ```
   
   I think what we could change is to have a method like 
`cluster.getSolrClientForCollection(COLLECTION)` and it looks up a map of 
SolrClients by collection name, and if it has it, returns it, and if it doesn't 
have it, then creates it.   Then in our cleanup code we shut them all down?   
   
   Alternatively, we could just create our CloudSolrClient right there, and not 
try to reuse them.  Then we could introduce more try/with resources patterns in 
those tests....?   


-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to