mirror of https://github.com/apache/lucene.git
beef up a few test configs to use Mock[FS]DirectoryFactory
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1328056 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4a3aba33b5
commit
e1ac7b416c
|
@ -21,5 +21,6 @@
|
|||
DO NOT ADD THINGS TO THIS CONFIG! -->
|
||||
<config>
|
||||
<luceneMatchVersion>LUCENE_31</luceneMatchVersion>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
</config>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
-->
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<query>
|
||||
<cache name="lfuCacheDecayFalse"
|
||||
class="solr.search.LFUCache"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<dataDir>${solr.data.dir:}</dataDir>
|
||||
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler">
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
<updateRequestProcessorChain name="comprehensive">
|
||||
<processor class="solr.FieldLengthUpdateProcessorFactory">
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.apache.solr.update.DirectUpdateHandler2;
|
|||
import org.apache.solr.update.UpdateLog;
|
||||
import org.apache.solr.update.UpdateHandler;
|
||||
import org.apache.solr.update.UpdateLog;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
@ -43,11 +44,25 @@ import static org.apache.solr.update.processor.DistributedUpdateProcessor.SEEN_L
|
|||
public class TestRecovery extends SolrTestCaseJ4 {
|
||||
private static String SEEN_LEADER_VAL="true"; // value that means we've seen the leader and have version info (i.e. we are a non-leader replica)
|
||||
private static int timeout=60; // acquire timeout in seconds. change this to a huge number when debugging to prevent threads from advancing.
|
||||
|
||||
// TODO: fix this test to not require FSDirectory
|
||||
static String savedFactory;
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
savedFactory = System.getProperty("solr.DirectoryFactory");
|
||||
System.setProperty("solr.directoryFactory", "org.apache.solr.core.MockFSDirectoryFactory");
|
||||
initCore("solrconfig-tlog.xml","schema12.xml");
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void afterClass() throws Exception {
|
||||
if (savedFactory == null) {
|
||||
System.clearProperty("solr.directoryFactory");
|
||||
} else {
|
||||
System.setProperty("solr.directoryFactory", savedFactory);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLogReplay() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue