aparnasuresh85 commented on code in PR #2571:
URL: https://github.com/apache/solr/pull/2571#discussion_r1689976255


##########
solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java:
##########
@@ -246,6 +250,51 @@ public void testAliasHandling() throws Exception {
         2, client.query(null, 
paramsWithMixedCollectionAndAlias).getResults().getNumFound());
   }
 
+  @Test
+  @LogLevel("org.apache.solr.servlet.HttpSolrCall=INFO")
+  public void testHttpCspPerf() throws Exception {
+
+    String COLLECTION = "TEST_COLLECTION";
+    CollectionAdminRequest.createCollection(COLLECTION, "conf", 2, 1)
+        .process(cluster.getSolrClient());
+    cluster.waitForActiveCollection(COLLECTION, 2, 2);
+
+    SolrInputDocument doc = new SolrInputDocument("id", "1", "title_s", "my 
doc");
+    httpBasedCloudSolrClient.add(COLLECTION, doc);
+    httpBasedCloudSolrClient.commit(COLLECTION);
+
+    Pattern patternWithCollection =
+        Pattern.compile(
+            
"path=/admin/collections.*params=\\{[^}]*action=CLUSTERSTATUS[^}]*collection=[^&}]+[^}]*\\}");
+
+    Pattern patternWithoutCollection =
+        Pattern.compile(
+            
"path=/admin/collections.*params=\\{[^}]*action=CLUSTERSTATUS(?![^}]*collection=)[^}]*\\}");
+
+    LogListener entireClusterStateLogs =
+        LogListener.info(HttpSolrCall.class).regex(patternWithoutCollection);
+    LogListener collectionClusterStateLogs =
+        LogListener.info(HttpSolrCall.class).regex(patternWithCollection);
+

Review Comment:
   I moved the monitoring higher up  - so now it expands the check end to end. 
   
   To ensure no other calls are sent,  I will need to add a debug log to 
HttpSolrCall as one doesnt exist now. Only admin requests are logged.



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

Reply via email to