Author: kwright
Date: Thu Jan 24 09:38:16 2013
New Revision: 1437920
URL: http://svn.apache.org/viewvc?rev=1437920&view=rev
Log:
Enhance the solr test to use the scenario claimed to be problematic.
Modified:
manifoldcf/trunk/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrTester.java
Modified:
manifoldcf/trunk/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrTester.java
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrTester.java?rev=1437920&r1=1437919&r2=1437920&view=diff
==============================================================================
---
manifoldcf/trunk/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrTester.java
(original)
+++
manifoldcf/trunk/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/SolrTester.java
Thu Jan 24 09:38:16 2013
@@ -145,16 +145,34 @@ public class SolrTester
// Save the job.
jobManager.save(job);
- // Now, start the job, and wait until it completes.
- long startTime = System.currentTimeMillis();
- jobManager.manualStart(job.getID());
- instance.waitJobInactiveNative(jobManager,job.getID(),300000L);
- System.err.println("Crawl required "+new
Long(System.currentTimeMillis()-startTime).toString()+" milliseconds");
-
ManifoldCFException exception = null;
if (exception == null)
{
+ try
+ {
+ // Now, start the job, and wait until it completes.
+ long startTime = System.currentTimeMillis();
+ jobManager.manualStart(job.getID());
+ instance.waitJobInactiveNative(jobManager,job.getID(),300000L);
+ System.err.println("Crawl required "+new
Long(System.currentTimeMillis()-startTime).toString()+" milliseconds");
+
+ // Force reindexing, and immediately retry. This is the case
+ // that always produces IOExceptions.
+
org.apache.manifoldcf.agents.system.ManifoldCF.signalOutputConnectionRedo(tc,"Solr
Connection");
+ startTime = System.currentTimeMillis();
+ jobManager.manualStart(job.getID());
+ instance.waitJobInactiveNative(jobManager,job.getID(),300000L);
+ System.err.println("Second crawl required "+new
Long(System.currentTimeMillis()-startTime).toString()+" milliseconds");
+ }
+ catch (ManifoldCFException e)
+ {
+ exception = e;
+ }
+ }
+
+ if (exception == null)
+ {
// Check to be sure we actually processed the right number of documents.
JobStatus status = jobManager.getStatus(job.getID());
if (status.getDocumentsProcessed() != 111)