You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2016/02/07 20:45:50 UTC
[13/21] lucene-solr git commit: add verbosity for this test when it
fails
add verbosity for this test when it fails
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2a768764
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2a768764
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2a768764
Branch: refs/heads/jira/lucene-5438-nrt-replication
Commit: 2a7687641e03d586688dcdad419674032e8f7a01
Parents: c2eb769
Author: Mike McCandless <mi...@apache.org>
Authored: Sun Feb 7 05:24:19 2016 -0500
Committer: Mike McCandless <mi...@apache.org>
Committed: Sun Feb 7 05:24:19 2016 -0500
----------------------------------------------------------------------
.../org/apache/lucene/store/BaseLockFactoryTestCase.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2a768764/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java
index 595efee..f2c7268 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java
@@ -210,6 +210,7 @@ public abstract class BaseLockFactoryTestCase extends LuceneTestCase {
@Override
public void run() {
IndexWriter writer = null;
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
for(int i=0;i<this.numIteration;i++) {
if (VERBOSE) {
System.out.println("TEST: WriterThread iter=" + i);
@@ -218,13 +219,17 @@ public abstract class BaseLockFactoryTestCase extends LuceneTestCase {
IndexWriterConfig iwc = new IndexWriterConfig(new MockAnalyzer(random()));
// We only print the IW infoStream output on exc, below:
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ PrintStream printStream;
try {
- iwc.setInfoStream(new PrintStreamInfoStream(new PrintStream(baos, true, "UTF8")));
+ printStream = new PrintStream(baos, true, "UTF8");
} catch (UnsupportedEncodingException uee) {
// shouldn't happen
throw new RuntimeException(uee);
}
+
+ iwc.setInfoStream(new PrintStreamInfoStream(printStream));
+
+ printStream.println("\nTEST: WriterThread iter=" + i);
iwc.setOpenMode(OpenMode.APPEND);
try {
writer = new IndexWriter(dir, iwc);