diff --git a/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java b/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java index 4574d631fff..4a58023d466 100644 --- a/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java +++ b/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java @@ -620,6 +620,12 @@ public abstract class LuceneTestCase extends Assert { for (Thread t : Thread.getAllStackTraces().keySet()) { rogueThreads.put(t, true); } + + // enable this by default, for IDE consistency with ant tests (as its the default from ant) + // TODO: really should be in solr base classes, but some extend LTC directly. + if (System.getProperty("solr.directoryFactory") == null) { + System.setProperty("solr.directoryFactory", "org.apache.solr.core.MockDirectoryFactory"); + } } /** diff --git a/solr/src/test/org/apache/solr/core/MockDirectoryFactory.java b/solr/src/test-framework/org/apache/solr/core/MockDirectoryFactory.java similarity index 100% rename from solr/src/test/org/apache/solr/core/MockDirectoryFactory.java rename to solr/src/test-framework/org/apache/solr/core/MockDirectoryFactory.java