You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/06/10 14:45:43 UTC

[GitHub] [solr] madrob commented on a change in pull request #111: SOLR-14164: Remove Solr's FunctionRangeQuery & ValueSourceRangeFilter

madrob commented on a change in pull request #111:
URL: https://github.com/apache/solr/pull/111#discussion_r649252114



##########
File path: solr/core/src/test/org/apache/solr/search/TestFiltering.java
##########
@@ -38,11 +41,18 @@
 public class TestFiltering extends SolrTestCaseJ4 {
 
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+  private static EmbeddedSolrServer server;
 
   @BeforeClass
   public static void beforeTests() throws Exception {
     System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
     initCore("solrconfig.xml","schema_latest.xml");
+    server = new EmbeddedSolrServer(h.getCoreContainer(), h.coreName);
+  }
+
+  @AfterClass
+  public static void afterTests() {
+    server = null;

Review comment:
       Does this do anything meaningful?

##########
File path: solr/core/src/test/org/apache/solr/search/TestFiltering.java
##########
@@ -193,6 +155,15 @@ public void testCaching() throws Exception {
 
   }
 
+  private Number getCacheStat(String cache, String stat) throws Exception {
+    final String key = "solr.core." + h.coreName + ":CACHE.searcher." + cache + ":" + stat;
+    return (Number)
+        server
+            .request(
+                new GenericSolrRequest(
+                    SolrRequest.METHOD.GET, "/admin/metrics", params("key", key)))
+            ._get("metrics/" + key, null);

Review comment:
       this indentation is pretty messy




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org