diff --git a/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java index 03ba0335c5d..3d60a18c43f 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java +++ b/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java @@ -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); + } } }