lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1642414 - /lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/util/TestArrayUtil.java
Date Sat, 29 Nov 2014 10:37:40 GMT
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);



Mime
View raw message