This is an automated email from the ASF dual-hosted git repository.
peterlee pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/main by this push:
new 849393b modify the CompressorParserTest.testLZ4Framed
849393b is described below
commit 849393bca29126db93a6b1151e77efc733912c9b
Author: PeterAlfredLee <[email protected]>
AuthorDate: Wed Dec 2 16:44:56 2020 +0800
modify the CompressorParserTest.testLZ4Framed
The existing testLZ4Framed can not read the content of the
testLZ4-framed.lz4, as it contains a corrupted test1.xml, which can not be
parsed by the xml parser.
Trying to fix it by replacing the lz4 test file.
---
.../test/resources/test-documents/testLZ4-framed.lz4 | Bin 1443 -> 137 bytes
.../apache/tika/parser/pkg/CompressorParserTest.java | 4 +---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git
a/tika-parsers/tika-parsers-classic/tika-parsers-classic-modules/tika-parser-pkg-module/src/test/resources/test-documents/testLZ4-framed.lz4
b/tika-parsers/tika-parsers-classic/tika-parsers-classic-modules/tika-parser-pkg-module/src/test/resources/test-documents/testLZ4-framed.lz4
index d2a813f..4d9bd9c 100644
Binary files
a/tika-parsers/tika-parsers-classic/tika-parsers-classic-modules/tika-parser-pkg-module/src/test/resources/test-documents/testLZ4-framed.lz4
and
b/tika-parsers/tika-parsers-classic/tika-parsers-classic-modules/tika-parser-pkg-module/src/test/resources/test-documents/testLZ4-framed.lz4
differ
diff --git
a/tika-parsers/tika-parsers-classic/tika-parsers-classic-package/src/test/java/org/apache/tika/parser/pkg/CompressorParserTest.java
b/tika-parsers/tika-parsers-classic/tika-parsers-classic-package/src/test/java/org/apache/tika/parser/pkg/CompressorParserTest.java
index 4bb3b73..16dffa5 100644
---
a/tika-parsers/tika-parsers-classic/tika-parsers-classic-package/src/test/java/org/apache/tika/parser/pkg/CompressorParserTest.java
+++
b/tika-parsers/tika-parsers-classic/tika-parsers-classic-package/src/test/java/org/apache/tika/parser/pkg/CompressorParserTest.java
@@ -36,9 +36,7 @@ public class CompressorParserTest extends TikaTest {
public void testLZ4Framed() throws Exception {
XMLResult r = getXML("testLZ4-framed.lz4");
assertEquals("application/x-lz4",
r.metadata.get(Metadata.CONTENT_TYPE));
- //xml parser throws an exception for test1.xml
- //for now, be content that the container file is correctly identified
- assertContains("test1.xml", r.xml);
+ assertContains("0123456789", r.xml);
}
@Test