lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1370243 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/index/TestDocValuesIndexing.java
Date Tue, 07 Aug 2012 13:18:43 GMT
Author: rmuir
Date: Tue Aug  7 13:18:43 2012
New Revision: 1370243

URL: http://svn.apache.org/viewvc?rev=1370243&view=rev
Log:
add test for when fixed dv is not really fixed length

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesIndexing.java

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesIndexing.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesIndexing.java?rev=1370243&r1=1370242&r2=1370243&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesIndexing.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesIndexing.java
Tue Aug  7 13:18:43 2012
@@ -1028,4 +1028,21 @@ public class TestDocValuesIndexing exten
     w.close();
     d.close();
   }
+  
+  public void testFixedLengthNotReallyFixed() throws IOException {
+    Directory d = newDirectory();
+    IndexWriter w = new IndexWriter(d, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())));
+    Document doc = new Document();
+    doc.add(new DerefBytesDocValuesField("foo", new BytesRef("bar"), true));
+    w.addDocument(doc);
+    doc = new Document();
+    doc.add(new DerefBytesDocValuesField("foo", new BytesRef("bazz"), true));
+    try {
+      w.addDocument(doc);
+    } catch (IllegalArgumentException expected) {
+      // expected
+    }
+    w.close();
+    d.close();
+  }
 }



Mime
View raw message