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

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@993599 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-09-08 04:16:05 +00:00
parent 63f331d880
commit 5bb82c1670
2 changed files with 14 additions and 67 deletions

View File

@ -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);
}

View File

@ -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);
}
}