This is an automated email from the ASF dual-hosted git repository.

tallison 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 055a3ceb6 TIKA-3928 -- add workaround to extract container parse 
exception even if metadatafilter renames field or removes it.
055a3ceb6 is described below

commit 055a3ceb69bdda2c002f38f6dadf2e4d9d29f616
Author: tballison <talli...@apache.org>
AuthorDate: Tue Nov 15 18:02:59 2022 -0500

    TIKA-3928 -- add workaround to extract container parse exception even if 
metadatafilter renames field or removes it.
---
 .../org/apache/tika/pipes/xsearch/tests/TikaPipesXSearchBase.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/java/org/apache/tika/pipes/xsearch/tests/TikaPipesXSearchBase.java
 
b/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/java/org/apache/tika/pipes/xsearch/tests/TikaPipesXSearchBase.java
index 3da8704d3..7416083ab 100644
--- 
a/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/java/org/apache/tika/pipes/xsearch/tests/TikaPipesXSearchBase.java
+++ 
b/tika-integration-tests/tika-pipes-opensearch-integration-tests/src/test/java/org/apache/tika/pipes/xsearch/tests/TikaPipesXSearchBase.java
@@ -125,8 +125,9 @@ public abstract class TikaPipesXSearchBase {
             }
             statusCounts.put(status, cnt);
         }
-        //the npe is caught and counted as a "parse success"
-        assertEquals(numHtmlDocs + 1, (int) statusCounts.get("PARSE_SUCCESS"));
+        assertEquals(numHtmlDocs, (int) statusCounts.get("PARSE_SUCCESS"));
+        //the npe is caught and counted as a "parse success with exception"
+        assertEquals(1, (int) 
statusCounts.get("PARSE_SUCCESS_WITH_EXCEPTION"));
         //the embedded docx is emitted directly
         assertEquals(1, (int) statusCounts.get("EMIT_SUCCESS"));
         assertEquals(2, (int) statusCounts.get("OOM"));

Reply via email to