diff --git a/lucene/classification/src/test/org/apache/lucene/classification/Test20NewsgroupsClassification.java b/lucene/classification/src/test/org/apache/lucene/classification/Test20NewsgroupsClassification.java index 6d5f5881a75..8366229fb77 100644 --- a/lucene/classification/src/test/org/apache/lucene/classification/Test20NewsgroupsClassification.java +++ b/lucene/classification/src/test/org/apache/lucene/classification/Test20NewsgroupsClassification.java @@ -23,7 +23,6 @@ import java.io.IOException; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import java.util.LinkedList; import java.util.List; import java.util.concurrent.ExecutorService; @@ -75,7 +74,7 @@ public final class Test20NewsgroupsClassification extends LuceneTestCase { private static final String CATEGORY_FIELD = "category"; private static final String BODY_FIELD = "body"; private static final String SUBJECT_FIELD = "subject"; - private static final String INDEX_DIR = "/path/to/lucene-solr/lucene/classification/20n"; + // private static final String INDEX_DIR = "/path/to/lucene-solr/lucene/classification/20n"; private static boolean index = true; private static boolean split = true; @@ -127,7 +126,7 @@ public final class Test20NewsgroupsClassification extends LuceneTestCase { long startIndex = System.nanoTime(); IndexWriter indexWriter = new IndexWriter(directory, new IndexWriterConfig(analyzer)); - Path indexDir = Paths.get(INDEX_DIR); + Path indexDir = createTempDir("Test20NewsgroupsClassification"); int docsIndexed = buildIndex(indexDir, indexWriter); long endIndex = System.nanoTime(); diff --git a/lucene/core/src/test/org/apache/lucene/index/Test2BPoints.java b/lucene/core/src/test/org/apache/lucene/index/Test2BPoints.java index 1975b6d1188..ca0318c1a8a 100644 --- a/lucene/core/src/test/org/apache/lucene/index/Test2BPoints.java +++ b/lucene/core/src/test/org/apache/lucene/index/Test2BPoints.java @@ -143,6 +143,6 @@ public class Test2BPoints extends LuceneTestCase { } private static Codec getCodec() { - return Codec.forName("Lucene84"); + return Codec.getDefault(); } } diff --git a/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValuesFixedSorted.java b/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValuesFixedSorted.java index 599fa2811b8..826580d8c46 100644 --- a/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValuesFixedSorted.java +++ b/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValuesFixedSorted.java @@ -82,12 +82,12 @@ public class Test2BSortedDocValuesFixedSorted extends LuceneTestCase { int expectedValue = 0; for (LeafReaderContext context : r.leaves()) { LeafReader reader = context.reader(); - BinaryDocValues dv = DocValues.getBinary(reader, "dv"); + SortedDocValues dv = DocValues.getSorted(reader, "dv"); for (int i = 0; i < reader.maxDoc(); i++) { assertEquals(i, dv.nextDoc()); bytes[0] = (byte) (expectedValue >> 8); bytes[1] = (byte) expectedValue; - final BytesRef term = dv.binaryValue(); + final BytesRef term = dv.lookupOrd(dv.ordValue()); assertEquals(data, term); expectedValue++; } diff --git a/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValuesOrds.java b/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValuesOrds.java index 41664442181..52bcc7a109a 100644 --- a/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValuesOrds.java +++ b/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValuesOrds.java @@ -84,7 +84,7 @@ public class Test2BSortedDocValuesOrds extends LuceneTestCase { int counter = 0; for (LeafReaderContext context : r.leaves()) { LeafReader reader = context.reader(); - BinaryDocValues dv = DocValues.getBinary(reader, "dv"); + SortedDocValues dv = DocValues.getSorted(reader, "dv"); for (int i = 0; i < reader.maxDoc(); i++) { assertEquals(i, dv.nextDoc()); bytes[0] = (byte) (counter >> 24); @@ -92,7 +92,7 @@ public class Test2BSortedDocValuesOrds extends LuceneTestCase { bytes[2] = (byte) (counter >> 8); bytes[3] = (byte) counter; counter++; - final BytesRef term = dv.binaryValue(); + final BytesRef term = dv.lookupOrd(dv.ordValue()); assertEquals(data, term); } } diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMaxDocs.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMaxDocs.java index 102d1786e5b..0f348044b60 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMaxDocs.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMaxDocs.java @@ -39,7 +39,7 @@ import org.apache.lucene.tests.util.TestUtil; import org.apache.lucene.tests.util.TimeUnits; @SuppressCodecs({"SimpleText", "Direct"}) -@TimeoutSuite(millis = 8 * TimeUnits.HOUR) +@TimeoutSuite(millis = 24 * TimeUnits.HOUR) public class TestIndexWriterMaxDocs extends LuceneTestCase { // The two hour time was achieved on a Linux 3.13 system with these specs: