/** * Configure, run and return the {@link MiniSolrCloudCluster} * @throws Exception if an error occurs on startup */ public MiniSolrCloudCluster build() throws Exception { MiniSolrCloudCluster cluster = new MiniSolrCloudCluster(nodeCount, baseDir, solrxml, jettyConfig, null, securityJson); CloudSolrClient client = cluster.getSolrClient(); for (Config config : configs) { ((ZkClientClusterStateProvider)client.getClusterStateProvider()).uploadConfig(config.path, config.name); } if (clusterProperties.size() > 0) { ClusterProperties props = new ClusterProperties(cluster.getSolrClient().getZkStateReader().getZkClient()); for (Map.Entry<String, String> entry : clusterProperties.entrySet()) { props.setClusterProperty(entry.getKey(), entry.getValue()); } } return cluster; }