Index: src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
===================================================================
--- src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java	(revision 806928)
+++ src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java	(working copy)
@@ -200,6 +200,13 @@
     assertEquals("queries should have same #hits",h1.size(),h4CustomAdd.size());
     assertEquals("queries should have same #hits",h1.size(),h5CustomMulAdd.size());
     
+    
+    QueryUtils.check(q1,s);
+    QueryUtils.check(q2,s);
+    QueryUtils.check(q3,s);
+    QueryUtils.check(q4,s);
+    QueryUtils.check(q5,s);
+    
     // verify scores ratios
     for (Iterator it = h1.keySet().iterator(); it.hasNext();) {
       Integer x = (Integer) it.next();
@@ -233,10 +240,11 @@
   }
 
   private void logResult(String msg, IndexSearcher s, Query q, int doc, float score1) throws IOException {
-    QueryUtils.check(q,s);
-    log(msg+" "+score1);
-    log("Explain by: "+q);
-    log(s.explain(q,doc));
+    if(DBG) {
+      log(msg+" "+score1);
+      log("Explain by: "+q);
+      log(s.explain(q,doc));
+    }
   }
 
   // since custom scoring modifies the order of docs, map results 

