Apache Lucene open-source search software
test class depended on the order of method execution
Robert Muird735ea6e121a
diff --git a/solr/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java b/solr/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.javaindex 2ed52df9a7f..88a2533f2f6 100644--- a/solr/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java+++ b/solr/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java@@ -35,6 +35,7 @@ import org.apache.solr.core.SolrCore;import org.apache.solr.handler.component.QueryElevationComponent.ElevationObj;import org.apache.solr.request.LocalSolrQueryRequest;import org.apache.solr.request.SolrQueryRequest;+import org.junit.Before;import org.junit.BeforeClass;import org.junit.Test;@@ -49,6 +50,14 @@ public class QueryElevationComponentTest extends SolrTestCaseJ4 {initCore("solrconfig-elevate.xml","schema12.xml");}+ @Before+ @Override+ public void setUp() throws Exception {+ super.setUp();+ clearIndex();+ assertU(commit());+ }+@Testpublic void testInterface() throws Exception{