SOLR-2949: use a diff elevate file for distrib QEC test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1302637 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2012-03-19 20:20:33 +00:00
parent 8e6f468ce1
commit 7cc0e9683e
1 changed files with 11 additions and 1 deletions

View File

@ -24,6 +24,8 @@ import org.apache.solr.BaseDistributedSearchTestCase;
import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.util.FileUtils;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
/**
@ -41,14 +43,22 @@ public class DistributedQueryElevationComponentTest extends BaseDistributedSearc
schemaString = "schema11.xml";
}
private static String elevateFilename = "elevate-data-distrib.xml";
@BeforeClass
public static void beforeClass() throws IOException {
System.setProperty("elevate.data.file", elevateFilename);
File parent = new File(TEST_HOME(), "conf");
File elevateFile = new File(parent, "elevate.xml");
File elevateDataFile = new File(parent, "elevate-data.xml");
File elevateDataFile = new File(parent, elevateFilename);
FileUtils.copyFile(elevateFile, elevateDataFile);
}
@AfterClass
public static void afterClass() throws IOException {
System.clearProperty("elevate.data.file");
}
@Override
public void doTest() throws Exception {