MiniSolrCloudCluster now takes a Path to a base directory in its constructor, gives names to its child JettySolrRunners, and creates subdirectories for them using those names.
This also changes the API to take solr.xml as a String rather than a File, and adds default solr.xml and jetty configs. There was only a single test that was using a non-standard solr.xml here.
You can now spin up a cluster as easily as:
MiniSolrCloudCluster cluster = new MiniSolrCloudCluster(4, createTempDir());
Giving the cluster control of its own directories has meant tweaks to a couple of tests in TestMiniSolrCloudCluster. We now always test that a collection can be deleted and then re-created, as the 'run this function twice sometimes' logic relied on some weird behaviour to do with re-use of existing directories. The test for async core loading was also not actually testing what it should have been - it passed because a newly started jetty was failing due to it trying to open up cores that were owned by other nodes, rather than because of any kind of async status. There are other tests for async loading, so I've just removed this.
One other issue that this has turned up is that creating collections is quite slow, due to non-leader nodes going into recovery and then waiting for 7 seconds (
SOLR-7141). I think this may be slowing down the entire test suite by several minutes (lots of tests create and delete collections, and 7 seconds per test adds up quickly). I'll open another ticket to investigate speeding that up.