mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-08-18 04:26:54 +00:00
Fix broken test
* Engine.java
tolerate (with return-false-forfailure rather than NPE) non-job directories
* EngineTest.java
use empty temp job directory rather than (possibly full-of-junk) general junit-tests directory
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
package org.archive.crawler.framework;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.archive.util.TmpDirTestCase;
|
||||
|
||||
public class EngineTest extends TmpDirTestCase {
|
||||
|
||||
public void testGetProfileCxmlResource() {
|
||||
assertNotNull(new Engine(getTmpDir()).getProfileCxmlResource());
|
||||
public void testGetProfileCxmlResource() throws IOException {
|
||||
File dummyJobsDir = new File(getTmpDir(),"dummyJobsDir");
|
||||
assertTrue(dummyJobsDir.mkdirs());
|
||||
assertNotNull(new Engine(dummyJobsDir).getProfileCxmlResource());
|
||||
FileUtils.deleteDirectory(dummyJobsDir);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user