dsmiley commented on code in PR #2901: URL: https://github.com/apache/solr/pull/2901#discussion_r1878613448
########## solr/core/src/test/org/apache/solr/handler/admin/api/ClusterPropsAPITest.java: ########## @@ -103,10 +109,9 @@ public void testClusterPropertyOpsAllGood() throws Exception { // List Properties, this time there should be 1 o = Utils.executeGET(client.getHttpClient(), baseUrlV2ClusterProps, Utils.JSONCONSUMER); assertNotNull(o); - assertEquals(1, ((List<?>) getObjectByPath(o, true, "clusterProperties")).size()); - assertEquals( - testClusterProperty, - (String) ((List<?>) getObjectByPath(o, true, "clusterProperties")).get(0)); + assertEquals(initCount + 1, ((List<?>) getObjectByPath(o, true, "clusterProperties")).size()); Review Comment: IMO this test shouldn't bother checking the size; it need only check that the entry it's expecting is there or is not there. Hamcrest test utils helps. I did this a day or two ago in this test: https://github.com/apache/solr/blob/2d3a8d9954a45c0eb1bbaa77b29f51ce314c1849/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ClusterStateProviderTest.java#L165 -- 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