iamsanjay commented on code in PR #2247: URL: https://github.com/apache/solr/pull/2247#discussion_r1483290620
########## solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java: ########## @@ -1011,4 +1011,61 @@ public static LinkedHashMapWriter getRespMap(String path, RestTestHarness restHa return new LinkedHashMapWriter<>(); } } + + public void testCacheDisableSolrConfig() throws Exception { + restTestHarness.setServerProvider(() -> getBaseUrl()); + MapWriter confMap = getRespMap("/admin/metrics", restTestHarness); + assertNotNull( + confMap._get( + asList("metrics", "solr.core.collection1", "CACHE.searcher.fieldValueCache"), null)); + // Here documentCache is disabled at initialization in SolrConfig + assertNull( + confMap._get( + asList("metrics", "solr.core.collection1", "CACHE.searcher.documentCache"), null)); + } + + public void testSetPropertyCacheSize() throws Exception{ + RESTfulServerProvider oldProvider = restTestHarness.getServerProvider(); + // Changing cache size + String payload = "{\n" + " 'set-property' : { 'query.documentCache.size': 399} \n" + " }"; + restTestHarness.setServerProvider(oldProvider); + runConfigCommand(restTestHarness, "/config", payload); Review Comment: Actually in-between I changed it. So just reset it back to old behaviour. ` restTestHarness.setServerProvider(() -> getBaseUrl());` -- 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