From 50b2e81e1ca830a3187186c4562ebf4c83feb2e6 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Sat, 4 Oct 2014 09:29:11 +0000 Subject: [PATCH] don't try to add too many docs in our monster tests git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1629366 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/Test2BBinaryDocValues.java | 8 ++++---- .../org/apache/lucene/index/Test2BNumericDocValues.java | 4 ++-- .../org/apache/lucene/index/Test2BSortedDocValues.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java b/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java index 598d4ff3682..de8b2c74ca8 100644 --- a/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java +++ b/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java @@ -37,7 +37,7 @@ import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; @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 extends LuceneTestCase { 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 extends LuceneTestCase { 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 extends LuceneTestCase { 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(); diff --git a/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java b/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java index d9cba8d5c8a..a4d9e3719b0 100644 --- a/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java +++ b/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java @@ -34,7 +34,7 @@ import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; @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 extends LuceneTestCase { 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) { diff --git a/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java b/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java index 8260e3d05ed..bea1581ac18 100644 --- a/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java +++ b/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java @@ -56,7 +56,7 @@ public class Test2BSortedDocValues extends LuceneTestCase { 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 extends LuceneTestCase { 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);