From 7cc0e9683e16fd4389a7bf2bc58ed79df2935d9f Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Mon, 19 Mar 2012 20:20:33 +0000 Subject: [PATCH] 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 --- .../DistributedQueryElevationComponentTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryElevationComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryElevationComponentTest.java index 9c1dcb810c7..e985bf87d67 100644 --- a/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryElevationComponentTest.java +++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryElevationComponentTest.java @@ -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 {