on analysis consistency fail, print the text for easier debugging

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1305143 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2012-03-25 21:23:49 +00:00
parent a278ba7a0c
commit c876a1b850
1 changed files with 6 additions and 2 deletions

View File

@ -390,8 +390,12 @@ public abstract class BaseTokenStreamTestCase extends LuceneTestCase {
text = randomAnalysisString(random, maxWordLength, simple);
}
checkAnalysisConsistency(random, a, useCharFilter, text);
try {
checkAnalysisConsistency(random, a, useCharFilter, text);
} catch (Throwable t) {
System.err.println("TEST FAIL: useCharFilter=" + useCharFilter + " text=" + text);
throw new RuntimeException(t);
}
}
}