Apache Nutch is an extensible and scalable web crawler
NUTCH-1998 Add support for user-defined file extension to CommonCrawlDataDumper: fix unit test
Sebastian Nagela2d65b655219
diff --git a/CHANGES.txt b/CHANGES.txtindex 0d14119a2..edc00a857 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,7 +2,7 @@ Nutch Change LogNutch Current Development 1.11-SNAPSHOT-* NUTCH-1988 Add support for user-defined file extension to CommonCrawlDataDumper (totaro via mattmann)+* NUTCH-1998 Add support for user-defined file extension to CommonCrawlDataDumper (totaro via mattmann)* NUTCH-1873 Solr IndexWriter/Job to report number of docs indexed. (snagel via lewismc)@@ -54,8 +54,6 @@ Release Report: http://s.apache.org/nutch10* NUTCH-1989 Handling invalid URLs in CommonCrawlDataDumper (Giuseppe Totaro via mattmann)-* NUTCH-1988 Make nested output directory dump optional (Michael Joyce via mattmann)-* NUTCH-1927 Create a whitelist of IPs/hostnames to allow skipping of RobotRules parsing (mattmann, snagel)* NUTCH-1986 Clarify Elastic Search Indexer Plugin Settings (Michael Joyce via mattmann)diff --git a/src/test/org/apache/nutch/tools/TestCommonCrawlDataDumper.java b/src/test/org/apache/nutch/tools/TestCommonCrawlDataDumper.javaindex 375fefefa..ba5b3abf4 100644--- a/src/test/org/apache/nutch/tools/TestCommonCrawlDataDumper.java+++ b/src/test/org/apache/nutch/tools/TestCommonCrawlDataDumper.java@@ -101,20 +101,16 @@ public class TestCommonCrawlDataDumper {CommonCrawlDataDumper dumper = new CommonCrawlDataDumper(new CommonCrawlConfig());- dumper.dump(tempDir, sampleSegmentDir, false, null, false);+ dumper.dump(tempDir, sampleSegmentDir, false, null, false, "");Collection<File> tempFiles = FileUtils.listFiles(tempDir,FileFilterUtils.fileFileFilter(),FileFilterUtils.directoryFileFilter());- boolean hasAll = true;for (String expectedFileName : crawledFiles) {- if (!hasFile(expectedFileName, tempFiles)) {- hasAll = false;- break;- }+ assertTrue("Missed file " + expectedFileName + " in dump",+ hasFile(expectedFileName, tempFiles));}- assertTrue(hasAll);}