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

tallison pushed a commit to branch TIKA-4672-fix-es-tests
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 85887b9d774defc5522559a6ccca0ad0d9d9e8d0
Author: tallison <[email protected]>
AuthorDate: Fri Mar 6 17:59:06 2026 -0500

    fix tests
---
 .../tika/pipes/elasticsearch/tests/ElasticsearchTest.java   | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git 
a/tika-integration-tests/tika-pipes-es-integration-tests/src/test/java/org/apache/tika/pipes/elasticsearch/tests/ElasticsearchTest.java
 
b/tika-integration-tests/tika-pipes-es-integration-tests/src/test/java/org/apache/tika/pipes/elasticsearch/tests/ElasticsearchTest.java
index a4b1ad0f67..aa83dbb916 100644
--- 
a/tika-integration-tests/tika-pipes-es-integration-tests/src/test/java/org/apache/tika/pipes/elasticsearch/tests/ElasticsearchTest.java
+++ 
b/tika-integration-tests/tika-pipes-es-integration-tests/src/test/java/org/apache/tika/pipes/elasticsearch/tests/ElasticsearchTest.java
@@ -151,7 +151,9 @@ public class ElasticsearchTest {
                 "\"from\": 0, \"size\": 1000 }";
         results = client.postJson(endpoint + "/_search", query);
         assertEquals(200, results.getStatus());
-        assertEquals(numHtmlDocs + numTestDocs,
+        // OOM/crash docs (oom.xml, fake_oom.xml) kill the forked JVM and
+        // never emit to the data index, so subtract 2
+        assertEquals(numHtmlDocs + numTestDocs - 2,
                 results.getJson().get("hits").get("total").get("value")
                         .asInt());
 
@@ -219,8 +221,9 @@ public class ElasticsearchTest {
         JsonResponse results =
                 client.postJson(endpoint + "/_search", query);
         assertEquals(200, results.getStatus());
-        assertEquals(numHtmlDocs + 3 + 12,
-                // 3 mock files and the .docx has 11 embedded + itself
+        // 1 mock file (npe.xml emits; oom.xml + fake_oom.xml crash)
+        // + the .docx has 11 embedded + itself = 12
+        assertEquals(numHtmlDocs + 1 + 12,
                 results.getJson().get("hits").get("total").get("value")
                         .asInt());
 
@@ -306,7 +309,9 @@ public class ElasticsearchTest {
                 "\"match_all\": {} } }";
         results = client.postJson(endpoint + "/_search", query);
         assertEquals(200, results.getStatus());
-        assertEquals(numHtmlDocs + 3 + 12,
+        // 1 mock file (npe.xml emits; oom.xml + fake_oom.xml crash)
+        // + the .docx has 11 embedded + itself = 12
+        assertEquals(numHtmlDocs + 1 + 12,
                 results.getJson().get("hits").get("total").get("value")
                         .asInt());
 

Reply via email to