dsmiley commented on code in PR #2751: URL: https://github.com/apache/solr/pull/2751#discussion_r1805062658
########## solr/solrj-zookeeper/src/test/org/apache/solr/client/solrj/impl/NodeValueFetcherTest.java: ########## @@ -62,28 +64,31 @@ public void cleanup() throws Exception { } @Test - public void testGetTags() { - - CloudLegacySolrClient solrClient = (CloudLegacySolrClient) cluster.getSolrClient(); - int totalCores = 0; - - // Sum all the cores of the collection by fetching tags of all nodes. - // We should get same number than when we created the collection - for (JettySolrRunner runner : cluster.getJettySolrRunners()) { - String node = runner.getNodeName(); - RemoteCallCtx ctx = new RemoteCallCtx(node, solrClient); - NodeValueFetcher fetcher = new NodeValueFetcher(); - - Set<String> requestedTags = Set.of("cores"); - fetcher.getTags(requestedTags, ctx); - - // make sure we only get the tag we asked - assertEquals(1, ctx.tags.size()); - - int coresOnNode = (Integer) ctx.tags.get("cores"); - totalCores += coresOnNode; + public void testGetTags() throws Exception { + try (var cloudHttp2SolrClient = + new CloudHttp2SolrClient.Builder( + Collections.singletonList(cluster.getZkServer().getZkAddress()), Optional.empty()) Review Comment: Minor: I recommend shorter List.of instead of the older Collections methods -- 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