SOLR-8542: reduce direct solrconfig-ltr.xml references in solr/contrib/ltr tests

This commit is contained in:
Christine Poerschke 2016-12-21 17:18:39 +00:00
parent f7ea2ae85d
commit ac3f1bb339
26 changed files with 29 additions and 34 deletions

View File

@ -26,7 +26,7 @@ public class TestLTRQParserExplain extends TestRerankBase {
@BeforeClass
public static void setup() throws Exception {
setuptest();
setuptest(true);
loadFeatures("features-store-test-model.json");
}

View File

@ -26,9 +26,7 @@ public class TestLTRQParserPlugin extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
// store = getModelStore();
bulkIndex();
setuptest(true);
loadFeatures("features-linear.json");
loadModels("linear-model.json");
@ -37,7 +35,6 @@ public class TestLTRQParserPlugin extends TestRerankBase {
@AfterClass
public static void after() throws Exception {
aftertest();
// store.clear();
}
@Test

View File

@ -28,7 +28,7 @@ public class TestLTRWithFacet extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "a1", "description", "E", "popularity",
"1"));

View File

@ -28,7 +28,7 @@ public class TestLTRWithSort extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "a1", "description", "E", "popularity",
"1"));
assertU(adoc("id", "2", "title", "a1 b1", "description",

View File

@ -75,14 +75,14 @@ public class TestRerankBase extends RestTestBase {
protected static File fstorefile = null;
protected static File mstorefile = null;
public static void setuptest() throws Exception {
protected static void setuptest(boolean bulkIndex) throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
bulkIndex();
if (bulkIndex) bulkIndex();
}
public static void setupPersistenttest() throws Exception {
protected static void setupPersistenttest(boolean bulkIndex) throws Exception {
setupPersistentTest("solrconfig-ltr.xml", "schema.xml");
bulkIndex();
if (bulkIndex) bulkIndex();
}
public static ManagedFeatureStore getManagedFeatureStore() {
@ -178,8 +178,6 @@ public class TestRerankBase extends RestTestBase {
FileUtils.deleteDirectory(tmpSolrHome);
System.clearProperty("managed.schema.mutable");
// System.clearProperty("enable.update.log");
}
public static void makeRestTestHarnessNull() {

View File

@ -104,7 +104,7 @@ public class TestSelectiveWeightCreation extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1 w3", "description", "w1", "popularity",
"1"));

View File

@ -27,7 +27,7 @@ public class TestEdisMaxSolrFeature extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1", "popularity",
"1"));

View File

@ -27,7 +27,7 @@ public class TestExternalFeatures extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1", "popularity",
"1"));

View File

@ -27,7 +27,7 @@ public class TestExternalValueFeatures extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1", "popularity",
"1"));

View File

@ -29,7 +29,7 @@ public class TestFeatureLogging extends TestRerankBase {
@BeforeClass
public static void setup() throws Exception {
setuptest();
setuptest(true);
}
@AfterClass

View File

@ -29,7 +29,7 @@ public class TestFeatureLtrScoringModel extends TestRerankBase {
@BeforeClass
public static void setup() throws Exception {
setuptest();
setuptest(true);
store = getManagedFeatureStore();
}

View File

@ -32,7 +32,7 @@ public class TestFeatureStore extends TestRerankBase {
@BeforeClass
public static void setup() throws Exception {
setuptest();
setuptest(true);
fstore = getManagedFeatureStore();
}

View File

@ -27,7 +27,7 @@ public class TestFieldLengthFeature extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1"));
assertU(adoc("id", "2", "title", "w2 2asd asdd didid", "description",

View File

@ -30,7 +30,7 @@ public class TestFieldValueFeature extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1", "popularity",
"1","isTrendy","true"));

View File

@ -28,7 +28,7 @@ import org.junit.Test;
public class TestFilterSolrFeature extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1", "popularity",
"1"));

View File

@ -33,7 +33,7 @@ public class TestNoMatchSolrFeature extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1", "popularity",
"1"));

View File

@ -32,7 +32,7 @@ public class TestOriginalScoreFeature extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1"));
assertU(adoc("id", "2", "title", "w2"));

View File

@ -28,7 +28,7 @@ public class TestRankingFeature extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1", "popularity",
"1"));

View File

@ -27,7 +27,7 @@ public class TestUserTermScoreWithQ extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1", "popularity",
"1"));

View File

@ -27,7 +27,7 @@ public class TestUserTermScorerQuery extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1", "popularity",
"1"));

View File

@ -27,7 +27,7 @@ public class TestUserTermScorereQDF extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1", "popularity",
"1"));

View File

@ -27,7 +27,7 @@ public class TestValueFeature extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1"));
assertU(adoc("id", "2", "title", "w2"));

View File

@ -50,7 +50,7 @@ public class TestLinearModel extends TestRerankBase {
@BeforeClass
public static void setup() throws Exception {
setuptest();
setuptest(true);
// loadFeatures("features-store-test-model.json");
store = getManagedModelStore();
fstore = getManagedFeatureStore().getFeatureStore("test");

View File

@ -30,7 +30,7 @@ public class TestMultipleAdditiveTreesModel extends TestRerankBase {
@BeforeClass
public static void before() throws Exception {
setuptest("solrconfig-ltr.xml", "schema.xml");
setuptest(false);
assertU(adoc("id", "1", "title", "w1", "description", "w1", "popularity","1"));
assertU(adoc("id", "2", "title", "w2", "description", "w2", "popularity","2"));

View File

@ -34,7 +34,7 @@ public class TestModelManager extends TestRerankBase {
@BeforeClass
public static void init() throws Exception {
setuptest();
setuptest(true);
}
@Before

View File

@ -31,7 +31,7 @@ public class TestModelManagerPersistence extends TestRerankBase {
@Before
public void init() throws Exception {
setupPersistenttest();
setupPersistenttest(true);
}
// executed first