Skip to content

Apache Lucene open-source search software

LUCENE-3969: don't use scary attsource ctor yet, and always print the analyzer for now

Robert Muir2a01acc0e8af
diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java
index 975c56c758f..fc93f3bc83b 100644
--- a/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java
+++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java
@@ -475,7 +475,9 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
// TODO: maybe the collator one...???
args[i] = AttributeFactory.DEFAULT_ATTRIBUTE_FACTORY;
} else if (paramType == AttributeSource.class) {
- args[i] = new AttributeSource();
+ // nocommit: args[i] = new AttributeSource();
+ // this is currently too scary to deal with!
+ args[i] = null; // force IAE
} else {
args[i] = newRandomArg(random, paramType);
}
@@ -660,7 +662,8 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
int numIterations = atLeast(20);
for (int i = 0; i < numIterations; i++) {
MockRandomAnalyzer a = new MockRandomAnalyzer(random.nextLong());
- if (VERBOSE) {
+ // nocommit: wrap the uncaught handler with our own that prints the analyzer
+ if (true || VERBOSE) {
System.out.println("Creating random analyzer:" + a);
}
try {