slackhappy commented on a change in pull request #1436:
URL: https://github.com/apache/lucene-solr/pull/1436#discussion_r474780615



##########
File path: solr/core/src/test/org/apache/solr/CursorPagingTest.java
##########
@@ -499,6 +492,61 @@ public void testSimple() throws Exception {
                               ));
   }
 
+  /**
+   * test that timeAllowed parameter can be used with cursors
+   * uses DelayingSearchComponent in solrconfig-deeppaging.xml
+   */
+  public void testTimeAllowed() throws Exception {
+    String wontExceedTimeout = "10000";
+    int numDocs = 100;
+    // Create a bunch of docs, inspired by createIndex in 
ExitableDirectoryReaderTest
+    for (int i = 0; i < numDocs; i++) {
+      assertU(adoc("id", Integer.toString(i), "name", "a" + i + " b" + i + " 
c" + i + " d"+i + " e" + i));

Review comment:
       I ended up keeping my own docs generation routine, because I wanted to 
do a little more with it:
   1. more than 100 docs [Bram's 
patch](https://issues.apache.org/jira/secure/attachment/13010039/SOLR-14413-bram.patch)
 used 1000, so I decided to use the same.
   1. generate an expected set of ids at the same time, so that I could confirm 
all results were paged through
   1. randomize the id insert order
   
   I took your advice about simplifying the name field.




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to