You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/08/11 12:33:03 UTC

[GitHub] [lucene-solr] madrob commented on a change in pull request #1736: Harden RequestRateLimiter Tests

madrob commented on a change in pull request #1736:
URL: https://github.com/apache/lucene-solr/pull/1736#discussion_r468542925



##########
File path: solr/core/src/test/org/apache/solr/servlet/TestRequestRateLimiter.java
##########
@@ -66,15 +66,11 @@ public void testConcurrentQueries() throws Exception {
 
     solrDispatchFilter.replaceRateLimitManager(rateLimitManager);
 
-    processTest(client);
+    processTest(client, 10000 /* number of documents */, 350 /* number of queries */);

Review comment:
       Can we limit the higher footprint to Nightly?

##########
File path: solr/core/src/test/org/apache/solr/servlet/TestRequestRateLimiter.java
##########
@@ -124,12 +120,12 @@ private void processTest(CloudSolrClient client) throws Exception {
     List<Future<Boolean>> futures;
 
     try {
-      for (int i = 0; i < 25; i++) {
+      for (int i = 0; i < numQueries; i++) {
         callableList.add(() -> {
           try {
             QueryResponse response = client.query(new SolrQuery("*:*"));
 
-            assertEquals(100, response.getResults().getNumFound());
+            assertEquals(10000, response.getResults().getNumFound());

Review comment:
       should be numDocuments

##########
File path: solr/core/src/test/org/apache/solr/servlet/TestRequestRateLimiter.java
##########
@@ -66,15 +66,11 @@ public void testConcurrentQueries() throws Exception {
 
     solrDispatchFilter.replaceRateLimitManager(rateLimitManager);
 
-    processTest(client);
+    processTest(client, 10000 /* number of documents */, 350 /* number of queries */);
 
     MockRequestRateLimiter mockQueryRateLimiter = (MockRequestRateLimiter) rateLimitManager.getRequestRateLimiter(SolrRequest.SolrRequestType.QUERY);
 
-    assertEquals(25, mockQueryRateLimiter.incomingRequestCount.get());
-    assertTrue("Incoming accepted new request count did not match. Expected 5 incoming " + mockQueryRateLimiter.acceptedNewRequestCount.get(),

Review comment:
       Somewhat concerning that the fix to the test is to relax the assertion conditions




----------------------------------------------------------------
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@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org