HoustonPutman commented on a change in pull request #414: URL: https://github.com/apache/solr/pull/414#discussion_r750486658
########## File path: solr/core/src/test/org/apache/solr/cloud/ReplaceNodeTest.java ########## @@ -210,6 +212,25 @@ public void test() throws Exception { } + @Test + public void testFailOnSingleNode() throws Exception { + configureCluster(1) + .addConfig("conf1", TEST_PATH().resolve("configsets").resolve("cloud-dynamic").resolve("conf")) + .configure(); + String coll = "replacesinglenodetest_coll"; + if (log.isInfoEnabled()) { + log.info("total_jettys: {}", cluster.getJettySolrRunners().size()); + } + + CloudSolrClient cloudClient = cluster.getSolrClient(); + cloudClient.request(CollectionAdminRequest.createCollection(coll, "conf1", 5, 1,0,0)); + + cluster.waitForActiveCollection(coll, 5, 5); + + String liveNode = cloudClient.getZkStateReader().getClusterState().getLiveNodes().stream().findAny().get(); Review comment: Just remembered the reason I use this. `getLiveNodes()` returns a set, which has no equivalent to `get(0)` -- 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