You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2012/08/31 10:33:00 UTC
svn commit: r1379358 - in /lucene/dev/branches/branch_4x: ./ solr/
solr/contrib/ solr/contrib/extraction/src/test-files/extraction/word2003.doc
solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java
Author: uschindler
Date: Fri Aug 31 08:32:59 2012
New Revision: 1379358
URL: http://svn.apache.org/viewvc?rev=1379358&view=rev
Log:
Merged revision(s) 1379357 from lucene/dev/trunk:
SOLR-3775: Add a test for Office 2003 file (.doc)
Added:
lucene/dev/branches/branch_4x/solr/contrib/extraction/src/test-files/extraction/word2003.doc
- copied unchanged from r1379357, lucene/dev/trunk/solr/contrib/extraction/src/test-files/extraction/word2003.doc
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/solr/ (props changed)
lucene/dev/branches/branch_4x/solr/contrib/ (props changed)
lucene/dev/branches/branch_4x/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java
Modified: lucene/dev/branches/branch_4x/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java?rev=1379358&r1=1379357&r2=1379358&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java Fri Aug 31 08:32:59 2012
@@ -144,7 +144,22 @@ public class ExtractingRequestHandlerTes
assertU(commit());
assertQ(req("stream_name:version_control.xml"), "//*[@numFound='1']");
-
+ loadLocal("extraction/word2003.doc", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
+ "fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
+ "fmap.Author", "extractedAuthor",
+ "literal.id", "four",
+ "uprefix", "ignored_",
+ "fmap.content", "extractedContent",
+ "fmap.language", "extractedLanguage",
+ "fmap.Last-Modified", "extractedDate"
+ );
+ assertQ(req("title:\"Word 2003 Title\""), "//*[@numFound='0']");
+ // There is already a PDF file with this content:
+ assertQ(req("extractedContent:\"This is a test of PDF and Word extraction in Solr, it is only a test\""), "//*[@numFound='1']");
+ assertU(commit());
+ assertQ(req("title:\"Word 2003 Title\""), "//*[@numFound='1']");
+ // now 2 of them:
+ assertQ(req("extractedContent:\"This is a test of PDF and Word extraction in Solr, it is only a test\""), "//*[@numFound='2']");
}
@@ -162,8 +177,7 @@ public class ExtractingRequestHandlerTes
//"fmap.content_type", "abcxyz",
"commit", "true" // test immediate commit
);
- assertTrue(false);
-
+ fail("Should throw SolrException");
} catch (SolrException e) {
//do nothing
} finally {