You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2014/11/29 11:37:40 UTC

svn commit: r1642414 - /lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/util/TestArrayUtil.java

Author: mikemccand
Date: Sat Nov 29 10:37:39 2014
New Revision: 1642414

URL: http://svn.apache.org/r1642414
Log:
fix test bug

Modified:
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/util/TestArrayUtil.java

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/util/TestArrayUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/util/TestArrayUtil.java?rev=1642414&r1=1642413&r2=1642414&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/util/TestArrayUtil.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/util/TestArrayUtil.java Sat Nov 29 10:37:39 2014
@@ -66,7 +66,7 @@ public class TestArrayUtil extends Lucen
     final Random rnd = random();
     final int num = atLeast(10000);
     for (int iter = 0; iter < num; iter++) {
-      final int minTargetSize = rnd.nextInt(Integer.MAX_VALUE);
+      final int minTargetSize = rnd.nextInt(ArrayUtil.MAX_ARRAY_LENGTH);
       final int elemSize = rnd.nextInt(11);
       final int v = ArrayUtil.oversize(minTargetSize, elemSize);
       assertTrue(v >= minTargetSize);