You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by ho...@apache.org on 2010/02/24 03:12:55 UTC

svn commit: r915641 - /lucene/solr/trunk/src/test/org/apache/solr/DisMaxRequestHandlerTest.java

Author: hossman
Date: Wed Feb 24 02:12:55 2010
New Revision: 915641

URL: http://svn.apache.org/viewvc?rev=915641&view=rev
Log:
fix testOldStyleDefaults so that it actually tests the old style defaults -- i broke it with a typo way back in r441175

Modified:
    lucene/solr/trunk/src/test/org/apache/solr/DisMaxRequestHandlerTest.java

Modified: lucene/solr/trunk/src/test/org/apache/solr/DisMaxRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/DisMaxRequestHandlerTest.java?rev=915641&r1=915640&r2=915641&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/DisMaxRequestHandlerTest.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/DisMaxRequestHandlerTest.java Wed Feb 24 02:12:55 2010
@@ -70,6 +70,9 @@
   }
 
   public void testSomeStuff() throws Exception {
+    doTestSomeStuff("dismax");
+  }
+  public void doTestSomeStuff(final String qt) throws Exception {
     populate();
 
     assertQ("basic match",
@@ -91,7 +94,7 @@
 
     assertQ("multi qf",
             req("q", "cool"
-                ,"qt", "dismax"
+                ,"qt", qt
                 ,"version", "2.0"
                 ,"qf", "subject"
                 ,"qf", "features_t"
@@ -101,7 +104,7 @@
 
     assertQ("boost query",
             req("q", "cool stuff"
-                ,"qt", "dismax"
+                ,"qt", qt
                 ,"version", "2.0"
                 ,"bq", "subject:hell^400"
                 )
@@ -113,7 +116,7 @@
 
     assertQ("multi boost query",
             req("q", "cool stuff"
-                ,"qt", "dismax"
+                ,"qt", qt
                 ,"version", "2.0"
                 ,"bq", "subject:hell^400"
                 ,"bq", "subject:cool^4"
@@ -138,14 +141,14 @@
             );
 
     assertQ("relying on ALTQ from config",
-            req( "qt", "dismax",
+            req( "qt", qt,
                  "fq", "id:666",
                  "facet", "false" )
             ,"//*[@numFound='1']"
             );
     
     assertQ("explicit ALTQ",
-            req( "qt", "dismax",
+            req( "qt", qt,
                  "q.alt", "id:9999",
                  "fq", "id:666",
                  "facet", "false" )
@@ -153,12 +156,12 @@
             );
 
     assertQ("no query slop == no match",
-            req( "qt", "dismax",
+            req( "qt", qt,
                  "q", "\"cool chick\"" )
             ,"//*[@numFound='0']"
             );
     assertQ("query slop == match",
-            req( "qt", "dismax",
+            req( "qt", qt,
                  "qs", "2",
                  "q", "\"cool chick\"" )
             ,"//*[@numFound='1']"
@@ -195,12 +198,12 @@
   public void testOldStyleDefaults() throws Exception {
 
     lrf = h.getRequestFactory
-      ("dismax", 0, 20,
+      ("dismaxOldStyleDefaults", 0, 20,
        "version","2.0",
        "facet", "true",
        "facet.field","t_s"
        );
-    testSomeStuff();
+    doTestSomeStuff("dismaxOldStyleDefaults");
   }