new DocPusherFactory(new MockFileFeedConnection(out));
MockInstantiator instantiator =
new MockInstantiator(new ThreadPool(300, new SystemClock()));
Traverser traverser = new QueryTraverser(pusherFactory, qtm,
instantiator.getTraversalStateStore(connectorName),
connectorName, null, new SystemClock());
instantiator.setupTraverser(connectorName, traverser);
System.out.println();
System.out.println("Running batch test batchsize " + batchHint);
int docsProcessed = 0;
int totalDocsProcessed = 0;
int batchNumber = 0;
BatchSize batchSize = new BatchSize(batchHint);
do {
BatchResult result = traverser.runBatch(batchSize);
docsProcessed = result.getCountProcessed();
if (docsProcessed > 0) {
totalDocsProcessed += docsProcessed;
}
System.out.println("Batch# " + batchNumber + " docs " +