Skip to content

Apache Lucene open-source search software

SOLR-1665: remove DistributedDebugComponentTest, move debug tests to TestDistributedSearch

Yonik Seeley5bb82c167080
diff --git a/solr/src/test/org/apache/solr/TestDistributedSearch.java b/solr/src/test/org/apache/solr/TestDistributedSearch.java
index eeff016f2d2..33629713d3a 100755
--- a/solr/src/test/org/apache/solr/TestDistributedSearch.java
+++ b/solr/src/test/org/apache/solr/TestDistributedSearch.java
@@ -96,7 +96,6 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {
query("q","*:*", "sort",f+" asc");
}
-
// these queries should be exactly ordered and scores should exactly match
query("q","*:*", "sort",i1+" desc");
query("q","*:*", "sort",i1+" asc");
@@ -129,22 +128,8 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {
query("q","now their fox sat had put","fl","foofoofoo",
"hl","true","hl.fl",t1);
-
- handle.put("debug", UNORDERED);
- handle.put("time", SKIPVAL);
-
- query("q","now their fox sat had put","fl","*,score",
- CommonParams.DEBUG_QUERY, "true");
-
- // TODO: This test currently fails because debug info is obtained only
- // on shards with matches.
- /***
- query("q","matchesnothing","fl","*,score",
- "debugQuery", "true");
- ***/
query("q","matchesnothing","fl","*,score");
-
query("q","*:*", "rows",100, "facet","true", "facet.field",t1);
query("q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.limit",-1, "facet.sort","count");
query("q","*:*", "rows",100, "facet","true", "facet.field",t1, "facet.limit",-1, "facet.sort","count", "facet.mincount",2);
@@ -197,6 +182,20 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {
query("q","*:*", "rows",100);
}
+ // test debugging
+ handle.put("explain", UNORDERED);
+ handle.put("debug", UNORDERED);
+ handle.put("time", SKIPVAL);
+ query("q","now their fox sat had put","fl","*,score",CommonParams.DEBUG_QUERY, "true");
+ query("q", "id:[1 TO 5]", CommonParams.DEBUG_QUERY, "true");
+ query("q", "id:[1 TO 5]", CommonParams.DEBUG, CommonParams.TIMING);
+ query("q", "id:[1 TO 5]", CommonParams.DEBUG, CommonParams.RESULTS);
+ query("q", "id:[1 TO 5]", CommonParams.DEBUG, CommonParams.QUERY);
+
+ // TODO: This test currently fails because debug info is obtained only
+ // on shards with matches.
+ // query("q","matchesnothing","fl","*,score", "debugQuery", "true");
+
// Thread.sleep(10000000000L);
}
diff --git a/solr/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java b/solr/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
deleted file mode 100644
index 813905f05eb..00000000000
--- a/solr/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.solr.handler.component;
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.solr.BaseDistributedSearchTestCase;
-import org.apache.solr.common.params.CommonParams;
-
-
-/**
- *
- *
- **/
-public class DistributedDebugComponentTest extends BaseDistributedSearchTestCase {
-
- @Override
- public void doTest() throws Exception {
- index(id, "1", "title", "this is a title");
- index(id, "2", "title", "this is another title.");
- index(id, "3", "title", "Mary had a little lamb.");
- commit();
- handle.clear();
- handle.put("QTime", SKIPVAL);
- handle.put("timestamp", SKIPVAL);
- handle.put("maxScore", SKIPVAL);
- handle.put("time", SKIPVAL);
-
- // we care only about the spellcheck results
- handle.put("response", SKIP);
- handle.put("explain", UNORDERED);
- handle.put("debug", UNORDERED);
- flags |= UNORDERED;
- query("q", "*:*", CommonParams.DEBUG_QUERY, "true");
- query("q", "*:*", CommonParams.DEBUG, CommonParams.TIMING);
- query("q", "*:*", CommonParams.DEBUG, CommonParams.RESULTS);
- query("q", "*:*", CommonParams.DEBUG, CommonParams.QUERY);
-
- }
-}