lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1525854 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/search/ lucene/test-framework/ lucene/test-framework/src/java/org/apache/lucene/index/
Date Tue, 24 Sep 2013 11:14:37 GMT
Author: mikemccand
Date: Tue Sep 24 11:14:36 2013
New Revision: 1525854

URL: http://svn.apache.org/r1525854
Log:
add test verbosity

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
    lucene/dev/branches/branch_4x/lucene/test-framework/   (props changed)
    lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/ThreadedIndexingAndSearchingTestCase.java

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java?rev=1525854&r1=1525853&r2=1525854&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
Tue Sep 24 11:14:36 2013
@@ -105,6 +105,10 @@ public class TestSearcherManager extends
       @Override
       public void run() {
         try {
+          if (VERBOSE) {
+            System.out.println("[" + Thread.currentThread().getName() + "]: launch reopen
thread");
+          }
+
           while(System.currentTimeMillis() < stopTime) {
             Thread.sleep(_TestUtil.nextInt(random(), 1, 100));
             writer.commit();

Modified: lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/ThreadedIndexingAndSearchingTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/ThreadedIndexingAndSearchingTestCase.java?rev=1525854&r1=1525853&r2=1525854&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/ThreadedIndexingAndSearchingTestCase.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/ThreadedIndexingAndSearchingTestCase.java
Tue Sep 24 11:14:36 2013
@@ -45,6 +45,7 @@ import org.apache.lucene.util.FailOnNonB
 import org.apache.lucene.util.LineFileDocs;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.NamedThreadFactory;
+import org.apache.lucene.util.PrintStreamInfoStream;
 import org.apache.lucene.util._TestUtil;
 
 // TODO
@@ -327,6 +328,9 @@ public abstract class ThreadedIndexingAn
       searchThreads[thread] = new Thread() {
           @Override
           public void run() {
+            if (VERBOSE) {
+              System.out.println(Thread.currentThread().getName() + ": launch search thread");
+            }
             while (System.currentTimeMillis() < stopTimeMS) {
               try {
                 final IndexSearcher s = getCurrentSearcher();
@@ -478,6 +482,17 @@ public abstract class ThreadedIndexingAn
       }
       });
 
+    if (VERBOSE) {
+      conf.setInfoStream(new PrintStreamInfoStream(System.out) {
+          @Override
+          public void message(String component, String message) {
+            if ("TP".equals(component)) {
+              return; // ignore test points!
+            }
+            super.message(component, message);
+          }
+        });
+    }
     writer = new IndexWriter(dir, conf);
     _TestUtil.reduceOpenFiles(writer);
 
@@ -498,7 +513,7 @@ public abstract class ThreadedIndexingAn
     final Thread[] indexThreads = launchIndexingThreads(docs, NUM_INDEX_THREADS, stopTime,
delIDs, delPackIDs, allSubDocs);
 
     if (VERBOSE) {
-      System.out.println("TEST: DONE start indexing threads [" + (System.currentTimeMillis()-t0)
+ " ms]");
+      System.out.println("TEST: DONE start " + NUM_INDEX_THREADS + " indexing threads ["
+ (System.currentTimeMillis()-t0) + " ms]");
     }
 
     // Let index build up a bit
@@ -599,7 +614,7 @@ public abstract class ThreadedIndexingAn
       if (!delIDs.contains(stringID)) {
         final TopDocs hits = s.search(new TermQuery(new Term("docid", stringID)), 1);
         if (hits.totalHits != 1) {
-          System.out.println("doc id=" + stringID + " is not supposed to be deleted, but
got hitCount=" + hits.totalHits);
+          System.out.println("doc id=" + stringID + " is not supposed to be deleted, but
got hitCount=" + hits.totalHits + "; delIDs=" + delIDs);
           doFail = true;
         }
       }



Mime
View raw message