lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject svn commit: r889463 - /lucene/java/trunk/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
Date Thu, 10 Dec 2009 23:26:38 GMT
Author: kalle
Date: Thu Dec 10 23:26:37 2009
New Revision: 889463

URL: http://svn.apache.org/viewvc?rev=889463&view=rev
Log:
LUCENE-2144
Warning about descripancy during invalid use of the TermDocs API.

Modified:
    lucene/java/trunk/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java

Modified: lucene/java/trunk/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java?rev=889463&r1=889462&r2=889463&view=diff
==============================================================================
--- lucene/java/trunk/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
(original)
+++ lucene/java/trunk/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
Thu Dec 10 23:26:37 2009
@@ -220,7 +220,18 @@
     // test seek default
     aprioriTermDocs = aprioriReader.termDocs();
     testTermDocs = testReader.termDocs();
-   // todo consider seeking and skipping some too
+
+    // this is invalid use of the API,
+    // but if the response differs then it's an indication that something might have changed.
+    // in 2.9 and 3.0 the two TermDocs-implementations returned different values at this
point.
+    assertEquals("Descripency during invalid use of the TermDocs API, see comments in test
code for details.",
+        aprioriTermDocs.next(), testTermDocs.next());
+
+    // start using the API one is supposed to
+
+    t = new Term("", "");
+    aprioriTermDocs.seek(t);
+    testTermDocs.seek(t);
 
     while (aprioriTermDocs.next()) {
       assertTrue(testTermDocs.next());



Mime
View raw message