Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

improve test debuggability

Michael McCandlesse383c21c6824
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
index 19c10b52b0c..76b92d3acfa 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
@@ -1087,6 +1087,7 @@ public class TestIndexWriter extends LuceneTestCase {
}
IndexWriterConfig conf = newIndexWriterConfig(random,
new MockAnalyzer(random)).setMaxBufferedDocs(2);
+ conf.setInfoStream(log);
w = new IndexWriter(dir, conf);
Document doc = new Document();
@@ -1102,6 +1103,7 @@ public class TestIndexWriter extends LuceneTestCase {
doc.add(sortedDVField);
doc.add(sortedSetDVField);
for(int i=0;i<100;i++) {
+ log.println("\nTEST: i=" + i);
idField.setStringValue(Integer.toString(i));
binaryDVField.setBytesValue(new BytesRef(idField.stringValue()));
numericDVField.setLongValue(i);