mirror of https://github.com/apache/lucene.git
Harden TestExportWriter
force MergePolicy to ensure index order assumptions are valid
(cherry picked from commit 8a24641fb2
)
This commit is contained in:
parent
f749bd7bc4
commit
c324be4874
|
@ -34,6 +34,7 @@ import org.apache.solr.SolrTestCaseJ4;
|
|||
import org.apache.solr.common.SolrInputDocument;
|
||||
import org.apache.solr.common.util.SuppressForbidden;
|
||||
import org.apache.solr.common.util.Utils;
|
||||
import org.apache.solr.index.LogDocMergePolicyFactory;
|
||||
import org.apache.solr.request.SolrQueryRequest;
|
||||
import org.apache.solr.schema.SchemaField;
|
||||
import org.junit.Before;
|
||||
|
@ -44,7 +45,9 @@ public class TestExportWriter extends SolrTestCaseJ4 {
|
|||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
System.setProperty("export.test", "true");
|
||||
// force LogDocMergePolicy so that we get a predictable doc order
|
||||
// when testing index order results
|
||||
systemSetPropertySolrTestsMergePolicyFactory(LogDocMergePolicyFactory.class.getName());
|
||||
initCore("solrconfig-sortingresponse.xml","schema-sortingresponse.xml");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue