manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1636560 - /manifoldcf/trunk/connectors/filesystem/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/filesystem/tests/BigCrawlTester.java
Date Tue, 04 Nov 2014 12:30:06 GMT
Author: kwright
Date: Tue Nov  4 12:30:05 2014
New Revision: 1636560

URL: http://svn.apache.org/r1636560
Log:
Make test do 2 crawls, so we catch funky behavior on the second

Modified:
    manifoldcf/trunk/connectors/filesystem/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/filesystem/tests/BigCrawlTester.java

Modified: manifoldcf/trunk/connectors/filesystem/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/filesystem/tests/BigCrawlTester.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/filesystem/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/filesystem/tests/BigCrawlTester.java?rev=1636560&r1=1636559&r2=1636560&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/filesystem/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/filesystem/tests/BigCrawlTester.java
(original)
+++ manifoldcf/trunk/connectors/filesystem/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/filesystem/tests/BigCrawlTester.java
Tue Nov  4 12:30:05 2014
@@ -161,7 +161,19 @@ public class BigCrawlTester
     // The test data area has 3 documents and one directory, and we have to count the root
directory too.
     if (status.getDocumentsProcessed() != 111111)
       throw new ManifoldCFException("Wrong number of documents processed - expected 111111,
saw "+new Long(status.getDocumentsProcessed()).toString());
-      
+
+    // Now, start the job AGAIN, and wait until it completes.
+    startTime = System.currentTimeMillis();
+    jobManager.manualStart(job.getID());
+    instance.waitJobInactiveNative(jobManager,job.getID(),18000000L);
+    System.err.println("Second crawl required "+new Long(System.currentTimeMillis()-startTime).toString()+"
milliseconds");
+
+    // Check to be sure we actually processed the right number of documents.
+    JobStatus status = jobManager.getStatus(job.getID());
+    // The test data area has 3 documents and one directory, and we have to count the root
directory too.
+    if (status.getDocumentsProcessed() != 111111)
+      throw new ManifoldCFException("Wrong number of documents processed - expected 111111,
saw "+new Long(status.getDocumentsProcessed()).toString());
+
     // Now, delete the job.
     jobManager.deleteJob(job.getID());
     instance.waitJobDeletedNative(jobManager,job.getID(),18000000L);



Mime
View raw message