lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r738211 - in /lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene: index/TestIndexReaderReopen.java search/TestScorerPerf.java
Date Tue, 27 Jan 2009 20:07:28 GMT
Author: mikemccand
Date: Tue Jan 27 20:07:27 2009
New Revision: 738211

URL: http://svn.apache.org/viewvc?rev=738211&view=rev
Log:
LUCENE-1483: small fixes to back-compat tests

Modified:
    lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
    lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/search/TestScorerPerf.java

Modified: lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java?rev=738211&r1=738210&r2=738211&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
(original)
+++ lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
Tue Jan 27 20:07:27 2009
@@ -320,7 +320,7 @@
       assertRefCountEquals(1, reader0);
 
       assertTrue(reader0 instanceof MultiSegmentReader);
-      SegmentReader[] subReaders0 = ((MultiSegmentReader) reader0).getSubReaders();
+      IndexReader[] subReaders0 = ((MultiSegmentReader) reader0).getSequentialSubReaders();
       for (int i = 0; i < subReaders0.length; i++) {
         assertRefCountEquals(1, subReaders0[i]);
       }
@@ -332,7 +332,7 @@
       
       IndexReader reader1 = refreshReader(reader0, true).refreshedReader;
       assertTrue(reader1 instanceof MultiSegmentReader);
-      SegmentReader[] subReaders1 = ((MultiSegmentReader) reader1).getSubReaders();
+      IndexReader[] subReaders1 = ((MultiSegmentReader) reader1).getSequentialSubReaders();
       assertEquals(subReaders0.length, subReaders1.length);
       
       for (int i = 0; i < subReaders0.length; i++) {
@@ -349,7 +349,7 @@
 
       IndexReader reader2 = refreshReader(reader1, true).refreshedReader;
       assertTrue(reader2 instanceof MultiSegmentReader);
-      SegmentReader[] subReaders2 = ((MultiSegmentReader) reader2).getSubReaders();
+      IndexReader[] subReaders2 = ((MultiSegmentReader) reader2).getSequentialSubReaders();
       assertEquals(subReaders1.length, subReaders2.length);
       
       for (int i = 0; i < subReaders2.length; i++) {
@@ -373,7 +373,7 @@
       
       IndexReader reader3 = refreshReader(reader0, true).refreshedReader;
       assertTrue(reader3 instanceof MultiSegmentReader);
-      SegmentReader[] subReaders3 = ((MultiSegmentReader) reader3).getSubReaders();
+      IndexReader[] subReaders3 = ((MultiSegmentReader) reader3).getSequentialSubReaders();
       assertEquals(subReaders3.length, subReaders0.length);
       
       // try some permutations
@@ -945,14 +945,14 @@
     
     if (checkSubReaders) {
       if (reader instanceof MultiSegmentReader) {
-        SegmentReader[] subReaders = ((MultiSegmentReader) reader).getSubReaders();
+        IndexReader[] subReaders = ((MultiSegmentReader) reader).getSequentialSubReaders();
         for (int i = 0; i < subReaders.length; i++) {
           assertReaderClosed(subReaders[i], checkSubReaders, checkNormsClosed);
         }
       }
       
       if (reader instanceof MultiReader) {
-        IndexReader[] subReaders = ((MultiReader) reader).getSubReaders();
+        IndexReader[] subReaders = ((MultiReader) reader).getSequentialSubReaders();
         for (int i = 0; i < subReaders.length; i++) {
           assertReaderClosed(subReaders[i], checkSubReaders, checkNormsClosed);
         }
@@ -971,7 +971,7 @@
     reader.ensureOpen();
     
     if (reader instanceof MultiSegmentReader) {
-      SegmentReader[] subReaders = ((MultiSegmentReader) reader).getSubReaders();
+      IndexReader[] subReaders = ((MultiSegmentReader) reader).getSequentialSubReaders();
       for (int i = 0; i < subReaders.length; i++) {
         assertReaderOpen(subReaders[i]);
       }

Modified: lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/search/TestScorerPerf.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/search/TestScorerPerf.java?rev=738211&r1=738210&r2=738211&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/search/TestScorerPerf.java
(original)
+++ lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/search/TestScorerPerf.java
Tue Jan 27 20:07:27 2009
@@ -51,6 +51,7 @@
     // This could possibly fail if Lucene starts checking for docid ranges...
     RAMDirectory rd = new RAMDirectory();
     IndexWriter iw = new IndexWriter(rd,new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
+    iw.addDocument(new Document());
     iw.close();
     s = new IndexSearcher(rd);
   }



Mime
View raw message