From 74471833e62c074b87ad41908ca7f6bffbee9fc8 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 21 Jan 2013 16:05:04 +0000 Subject: [PATCH] improve dv testing git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1436437 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/TestIndexWriterExceptions.java | 7 ++++++- .../org/apache/lucene/index/TestIndexWriterOnDiskFull.java | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java index 5df259c6435..8a582ca0434 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java @@ -27,9 +27,12 @@ import java.util.Random; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.lucene.analysis.*; +import org.apache.lucene.document.BinaryDocValuesField; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.FieldType; +import org.apache.lucene.document.LongDocValuesField; +import org.apache.lucene.document.SortedBytesDocValuesField; import org.apache.lucene.document.StringField; import org.apache.lucene.document.TextField; import org.apache.lucene.index.IndexWriterConfig.OpenMode; @@ -49,7 +52,6 @@ import org.apache.lucene.util.InfoStream; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util._TestUtil; -//nocommit: make this tests DV2.0 public class TestIndexWriterExceptions extends LuceneTestCase { private static class DocCopyIterator implements Iterable { @@ -138,6 +140,9 @@ public class TestIndexWriterExceptions extends LuceneTestCase { doc.add(newTextField(r, "content4", "aaa bbb ccc ddd", Field.Store.NO)); doc.add(newStringField(r, "content5", "aaa bbb ccc ddd", Field.Store.NO)); + doc.add(new LongDocValuesField("numericdv", 5)); + doc.add(new BinaryDocValuesField("binarydv", new BytesRef("hello"))); + doc.add(new SortedBytesDocValuesField("sorteddv", new BytesRef("world"))); doc.add(newField(r, "content7", "aaa bbb ccc ddd", DocCopyIterator.custom4)); diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java index 184a0c2fa94..e000debbafd 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java @@ -41,7 +41,6 @@ import static org.apache.lucene.index.TestIndexWriter.assertNoUnreferencedFiles; /** * Tests for IndexWriter when the disk runs out of space */ -//nocommit: make sure disk full etc tests here test DV2.0 public class TestIndexWriterOnDiskFull extends LuceneTestCase { /*