use ramdir for local tests and fsdir for nightly tests

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/branches/newtrunk@926073 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2010-03-22 13:30:36 +00:00
parent 8af45aadd2
commit c5a9eded5c
24 changed files with 144 additions and 3 deletions

View File

@ -388,6 +388,10 @@
</or>
</not>
</condition>
<condition property="dir.prop" value="-Dsolr.directoryFactory=solr.StandardDirectoryFactory">
<isset property="use.fsdir"/>
</condition>
<property name="dir.prop" value=""/>
<junit printsummary="no"
haltonfailure="no"
errorProperty="tests.failed"
@ -396,7 +400,9 @@
>
<sysproperty key="java.util.logging.config.file" value="${common-solr.dir}/testlogging.properties"/>
<sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
<jvmarg line="${dir.prop}"/>
<jvmarg line="${args}"/>
<formatter type="brief" usefile="false" if="junit.details"/>
<classpath refid="test.run.classpath"/>
<formatter type="${junit.formatter}"/>
@ -865,9 +871,14 @@
</target>
<target name="nightly"
depends="test, create-package">
depends="set-fsdir, test, create-package">
<!-- no description, don't advertise -->
</target>
<target name="set-fsdir">
<property name="use.fsdir" value="true"/>
</target>
<target name="-taskdef">
<typedef resource="org/apache/rat/anttasks/antlib.xml" uri="antlib:rat.anttasks">
<classpath>

View File

@ -105,7 +105,7 @@ public abstract class AbstractSolrTestCase extends TestCase {
log.info("####SETUP_START " + getName());
factoryProp = System.getProperty("solr.directoryFactory");
if (factoryProp == null) {
// System.setProperty("solr.directoryFactory","solr.RAMDirectoryFactory");
System.setProperty("solr.directoryFactory","solr.RAMDirectoryFactory");
}
dataDir = new File(System.getProperty("java.io.tmpdir")
+ System.getProperty("file.separator")

View File

@ -1,6 +1,7 @@
package org.apache.solr.handler.component;
import org.apache.solr.BaseDistributedSearchTestCase;
import org.apache.solr.util.AbstractSolrTestCase;
/**
* Test for SpellCheckComponent's distributed querying
@ -11,6 +12,21 @@ import org.apache.solr.BaseDistributedSearchTestCase;
*/
public class DistributedSpellCheckComponentTest extends BaseDistributedSearchTestCase {
private String saveProp;
@Override
public void setUp() throws Exception {
// this test requires FSDir
saveProp = System.getProperty("solr.directoryFactory");
System.setProperty("solr.directoryFactory", "solr.StandardDirectoryFactory");
super.setUp();
}
@Override
public void tearDown() throws Exception {
super.tearDown();
System.setProperty("solr.directoryFactory", saveProp);
}
@Override
public void doTest() throws Exception {
index(id, "1", "lowerfilt", "toyota");

View File

@ -31,6 +31,11 @@
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -31,6 +31,12 @@
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -31,6 +31,12 @@
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -29,6 +29,12 @@
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -31,6 +31,12 @@
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -26,6 +26,12 @@
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<useCompoundFile>false</useCompoundFile>
<mergeFactor>10</mergeFactor>

View File

@ -31,6 +31,12 @@
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -31,6 +31,12 @@
<indexDir>index</indexDir>
-->
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -29,6 +29,12 @@
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -45,6 +45,12 @@
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -31,6 +31,12 @@
<indexDir>index</indexDir>
-->
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -45,6 +45,12 @@
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -45,6 +45,11 @@
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -23,6 +23,10 @@
-->
<config>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<query>

View File

@ -26,6 +26,12 @@
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<useCompoundFile>false</useCompoundFile>
<mergeFactor>10</mergeFactor>

View File

@ -17,6 +17,12 @@
-->
<config>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<useCompoundFile>false</useCompoundFile>
<mergeFactor>10</mergeFactor>

View File

@ -37,6 +37,11 @@
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default
unless overridden. -->

View File

@ -19,6 +19,12 @@
<config>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<updateRequestProcessorChain name="standard">
<processor class="solr.LogUpdateProcessorFactory" >
<int name="maxNumToLog">100</int>

View File

@ -30,6 +30,12 @@
It defaults to "index" if not present, and should probably
not be changed if replication is in use. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default

View File

@ -48,7 +48,7 @@
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<luceneMatchVersion>3.1</luceneMatchVersion>

View File

@ -31,6 +31,11 @@
If replication is in use, this should match the replication configuration. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
<indexDefaults>
<!-- Values here affect all index writers and act as a default unless overridden. -->