slackhappy commented on a change in pull request #1436:
URL: https://github.com/apache/lucene-solr/pull/1436#discussion_r473300877
##########
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:
great point, I'll use ExitableDirectoryReaderTest.createIndex directly.
In my testing, it seemed to be useful to use the higher complexity prefix
search to have a better guarantee of triggering partialResults with
timeAllowed. I suspect that is what ExitableDirectoryReaderTest to use that
strategy, but to your point, `"a" + i` would be sufficient.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]