Skip to content

Commit

Permalink
- Fixed a ParseUtil method call and removed unused line of code
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/lucene/nutch/trunk@417560 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Otis Gospodnetic committed Jun 27, 2006
1 parent 85fb4d5 commit 20033b5
Showing 1 changed file with 8 additions and 11 deletions.
Expand Up @@ -16,24 +16,21 @@

package org.apache.nutch.parse.mp3;

import junit.framework.TestCase;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.UTF8;
import org.apache.nutch.crawl.CrawlDatum;
import org.apache.nutch.metadata.Metadata;
import org.apache.nutch.parse.Parse;
import org.apache.nutch.parse.ParseException;
import org.apache.nutch.parse.ParseUtil;
import org.apache.nutch.parse.ParserFactory;
import org.apache.nutch.protocol.Content;
import org.apache.nutch.protocol.Protocol;
import org.apache.nutch.protocol.ProtocolException;
import org.apache.nutch.protocol.ProtocolFactory;

import java.util.Properties;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.UTF8;
import org.apache.nutch.crawl.CrawlDatum;
import org.apache.nutch.metadata.Metadata;
import org.apache.nutch.parse.Parser;
import org.apache.nutch.util.NutchConfiguration;

import junit.framework.TestCase;

/**
* Unit tests for TestMP3Parser. (Adapted from John Xing msword unit tests).
*
Expand Down Expand Up @@ -132,8 +129,8 @@ public void testNone() throws ProtocolException, ParseException {
protocol = new ProtocolFactory(conf).getProtocol(urlString);
content = protocol.getProtocolOutput(new UTF8(urlString), new CrawlDatum())
.getContent();
parse = new ParseUtil(conf).parseByParserId("parse-mp3", content);
Metadata metadata = parse.getData().getParseMeta();
parse = new ParseUtil(conf).parseByExtensionId("parse-mp3", content);
// Metadata metadata = parse.getData().getParseMeta();
if (parse.getData().getStatus().isSuccess()) {
fail("Expected ParseException");
}
Expand Down

0 comments on commit 20033b5

Please sign in to comment.