Changed ingest method calls to work with the new ingest framework.

This commit is contained in:
alexjacks92 2014-03-27 12:33:02 -04:00
parent 208657e245
commit ae94e25dc2

View File

@ -80,12 +80,14 @@ public class RegressionTest extends TestCase {
private static final Logger logger = Logger.getLogger(RegressionTest.class.getName()); private static final Logger logger = Logger.getLogger(RegressionTest.class.getName());
long start; long start;
Integer jobsNum;
/** /**
* Constructor required by JUnit * Constructor required by JUnit
*/ */
public RegressionTest(String name) { public RegressionTest(String name) {
super(name); super(name);
jobsNum = null;
} }
/** /**
@ -262,21 +264,16 @@ public class RegressionTest extends TestCase {
public void testIngest() { public void testIngest() {
logger.info("Ingest 3"); logger.info("Ingest 3");
long start = System.currentTimeMillis(); long startIngest = System.currentTimeMillis();
IngestManager man = IngestManager.getDefault(); IngestManager man = IngestManager.getInstance();
while (man.isEnqueueRunning()) { // there is no longer a way to monitor enqueue. Keeping for a moment in case we decide to put it back.
new Timeout("pausing", 5000).sleep(); // give it a second (or five) to process // TODO: delete this
} //logger.log(Level.INFO, "Enqueue took {0}ms", (System.currentTimeMillis() - startIngest));
logger.info("Enqueue took " + (System.currentTimeMillis() - start) + "ms");
while (man.isIngestRunning()) { while (man.isIngestRunning()) {
new Timeout("pausing", 1000).sleep(); // give it a second (or five) to process new Timeout("pausing", 1000).sleep(); // give it a second (or five) to process
} }
new Timeout("pausing", 15000).sleep(); // give it a second (or fifteen) to process
while (man.areModulesRunning()) {
new Timeout("pausing", 5000).sleep(); // give it a second (or five) to process
}
logger.info("Ingest (including enqueue) took " + (System.currentTimeMillis() - start) + "ms"); logger.log(Level.INFO, "Ingest (including enqueue) took {0}ms", (System.currentTimeMillis() - startIngest));
// allow keyword search to finish saving artifacts, just in case // allow keyword search to finish saving artifacts, just in case
// but randomize the timing so that we don't always get the same error // but randomize the timing so that we don't always get the same error
// consistently, making it seem like default behavior // consistently, making it seem like default behavior
@ -340,9 +337,11 @@ public class RegressionTest extends TestCase {
} }
} }
/*
private void setListForIngest() { private void setListForIngest() {
KeywordSearchListsXML curr = KeywordSearchListsXML.getCurrent(); KeywordSearchListsXML curr;
curr = KeywordSearchListsXML.getCurrent();
curr.setUseForIngest("URLs", true); curr.setUseForIngest("URLs", true);
} }
*/
} }