lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1629366 - in /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index: Test2BBinaryDocValues.java Test2BNumericDocValues.java Test2BSortedDocValues.java
Date Sat, 04 Oct 2014 09:29:11 GMT
Author: mikemccand
Date: Sat Oct  4 09:29:11 2014
New Revision: 1629366

URL: http://svn.apache.org/r1629366
Log:
don't try to add too many docs in our monster tests

Modified:
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java?rev=1629366&r1=1629365&r2=1629366&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java
Sat Oct  4 09:29:11 2014
@@ -37,7 +37,7 @@ import com.carrotsearch.randomizedtestin
 @Monster("takes ~ 45 minutes")
 public class Test2BBinaryDocValues extends LuceneTestCase {
   
-  // indexes Integer.MAX_VALUE docs with a fixed binary field
+  // indexes IndexWriter.MAX_DOCS docs with a fixed binary field
   public void testFixedBinary() throws Exception {
     BaseDirectoryWrapper dir = newFSDirectory(createTempDir("2BFixedBinary"));
     if (dir instanceof MockDirectoryWrapper) {
@@ -58,7 +58,7 @@ public class Test2BBinaryDocValues exten
     BinaryDocValuesField dvField = new BinaryDocValuesField("dv", data);
     doc.add(dvField);
     
-    for (int i = 0; i < Integer.MAX_VALUE; i++) {
+    for (int i = 0; i < IndexWriter.MAX_DOCS; i++) {
       bytes[0] = (byte)(i >> 24);
       bytes[1] = (byte)(i >> 16);
       bytes[2] = (byte)(i >> 8);
@@ -96,7 +96,7 @@ public class Test2BBinaryDocValues exten
     dir.close();
   }
   
-  // indexes Integer.MAX_VALUE docs with a variable binary field
+  // indexes IndexWriter.MAX_DOCS docs with a variable binary field
   public void testVariableBinary() throws Exception {
     BaseDirectoryWrapper dir = newFSDirectory(createTempDir("2BVariableBinary"));
     if (dir instanceof MockDirectoryWrapper) {
@@ -118,7 +118,7 @@ public class Test2BBinaryDocValues exten
     BinaryDocValuesField dvField = new BinaryDocValuesField("dv", data);
     doc.add(dvField);
     
-    for (int i = 0; i < Integer.MAX_VALUE; i++) {
+    for (int i = 0; i < IndexWriter.MAX_DOCS; i++) {
       encoder.reset(bytes);
       encoder.writeVInt(i % 65535); // 1, 2, or 3 bytes
       data.length = encoder.getPosition();

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java?rev=1629366&r1=1629365&r2=1629366&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java
Sat Oct  4 09:29:11 2014
@@ -34,7 +34,7 @@ import com.carrotsearch.randomizedtestin
 @Monster("takes ~ 30 minutes")
 public class Test2BNumericDocValues extends LuceneTestCase {
   
-  // indexes Integer.MAX_VALUE docs with an increasing dv field
+  // indexes IndexWriter.MAX_DOCS docs with an increasing dv field
   public void testNumerics() throws Exception {
     BaseDirectoryWrapper dir = newFSDirectory(createTempDir("2BNumerics"));
     if (dir instanceof MockDirectoryWrapper) {
@@ -53,7 +53,7 @@ public class Test2BNumericDocValues exte
     NumericDocValuesField dvField = new NumericDocValuesField("dv", 0);
     doc.add(dvField);
     
-    for (int i = 0; i < Integer.MAX_VALUE; i++) {
+    for (int i = 0; i < IndexWriter.MAX_DOCS; i++) {
       dvField.setLongValue(i);
       w.addDocument(doc);
       if (i % 100000 == 0) {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java?rev=1629366&r1=1629365&r2=1629366&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java
Sat Oct  4 09:29:11 2014
@@ -56,7 +56,7 @@ public class Test2BSortedDocValues exten
     SortedDocValuesField dvField = new SortedDocValuesField("dv", data);
     doc.add(dvField);
     
-    for (int i = 0; i < Integer.MAX_VALUE; i++) {
+    for (int i = 0; i < IndexWriter.MAX_DOCS; i++) {
       bytes[0] = (byte)(i >> 8);
       bytes[1] = (byte) i;
       w.addDocument(doc);
@@ -111,7 +111,7 @@ public class Test2BSortedDocValues exten
     SortedDocValuesField dvField = new SortedDocValuesField("dv", data);
     doc.add(dvField);
     
-    for (int i = 0; i < Integer.MAX_VALUE; i++) {
+    for (int i = 0; i < IndexWriter.MAX_DOCS; i++) {
       bytes[0] = (byte)(i >> 24);
       bytes[1] = (byte)(i >> 16);
       bytes[2] = (byte)(i >> 8);



Mime
View raw message