diff --git a/solr/core/src/test/org/apache/solr/EchoParamsTest.java b/solr/core/src/test/org/apache/solr/EchoParamsTest.java index b09011364d4..dded78d2df4 100644 --- a/solr/core/src/test/org/apache/solr/EchoParamsTest.java +++ b/solr/core/src/test/org/apache/solr/EchoParamsTest.java @@ -31,25 +31,32 @@ public class EchoParamsTest extends SolrTestCaseJ4 { } private static final String HEADER_XPATH = "/response/lst[@name='responseHeader']"; - + @Test - public void testDefaultEchoParams() { + public void test() { + defaultEchoParams(); + defaultEchoParamsDefaultVersion(); + explicitEchoParams(); + allEchoParams(); + } + + // the following test methods rely on their order, which is no longer guaranteed by Java 7, so call them directly above: + + private void defaultEchoParams() { lrf.args.put("wt", "xml"); lrf.args.put(CommonParams.VERSION, "2.2"); assertQ(req("foo"),HEADER_XPATH + "/int[@name='status']"); assertQ(req("foo"),"not(//lst[@name='params'])"); } - @Test - public void testDefaultEchoParamsDefaultVersion() { + private void defaultEchoParamsDefaultVersion() { lrf.args.put("wt", "xml"); lrf.args.remove(CommonParams.VERSION); assertQ(req("foo"),HEADER_XPATH + "/int[@name='status']"); assertQ(req("foo"),"not(//lst[@name='params'])"); } - @Test - public void testExplicitEchoParams() { + private void explicitEchoParams() { lrf.args.put("wt", "xml"); lrf.args.put(CommonParams.VERSION, "2.2"); lrf.args.put("echoParams", "explicit"); @@ -58,8 +65,7 @@ public class EchoParamsTest extends SolrTestCaseJ4 { assertQ(req("foo"),HEADER_XPATH + "/lst[@name='params']/str[@name='wt'][.='xml']"); } - @Test - public void testAllEchoParams() { + private void allEchoParams() { lrf = h.getRequestFactory ("crazy_custom_qt", 0, 20, CommonParams.VERSION,"2.2", diff --git a/solr/core/src/test/org/apache/solr/search/TestFiltering.java b/solr/core/src/test/org/apache/solr/search/TestFiltering.java index f9c3b310c18..07fe549ef10 100644 --- a/solr/core/src/test/org/apache/solr/search/TestFiltering.java +++ b/solr/core/src/test/org/apache/solr/search/TestFiltering.java @@ -36,6 +36,7 @@ public class TestFiltering extends SolrTestCaseJ4 { public void testCaching() throws Exception { + clearIndex(); assertU(adoc("id","4", "val_i","1")); assertU(adoc("id","1", "val_i","2")); assertU(adoc("id","3", "val_i","3"));