dweiss commented on code in PR #15118:
URL: https://github.com/apache/lucene/pull/15118#discussion_r2297285454


##########
lucene/core/src/test/org/apache/lucene/search/TestTermInSetQuery.java:
##########
@@ -112,16 +112,23 @@ public void testAllDocsInFieldTerm() throws IOException {
   public void testDuel() throws IOException {
     final int iters = atLeast(2);
     final String field = "f";
+    final int maxTerms = 256;
     for (int iter = 0; iter < iters; ++iter) {
       final List<BytesRef> allTerms = new ArrayList<>();
-      final int numTerms = TestUtil.nextInt(random(), 1, 1 << 
TestUtil.nextInt(random(), 1, 10));
+      // final int numTerms = TestUtil.nextInt(random(), 1, 1 << 
TestUtil.nextInt(random(), 1, 10));
+      final int numTerms = Math.min(
+          TestUtil.nextInt(random(), 1, 1 << TestUtil.nextInt(random(), 1, 
10)),
+          maxTerms
+      );

Review Comment:
   I'd reuse RandomizedTest.randomIntBetween(...) instead of this code.



-- 
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...@lucene.apache.org

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