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

janhoy pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_10x by this push:
     new 9a10b04e3d7 Fix flaky BATS integration tests for extraction (#4303)
9a10b04e3d7 is described below

commit 9a10b04e3d7ea7993bb803e30d232a2a277a83c5
Author: Jan Høydahl <[email protected]>
AuthorDate: Wed May 13 15:50:29 2026 +0200

    Fix flaky BATS integration tests for extraction (#4303)
    
    (cherry picked from commit 5aad2a757faa46a3216d34f25c74cf86f87165d7)
---
 solr/packaging/test/test_extraction.bats | 8 +++++++-
 solr/packaging/test/test_start_solr.bats | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/solr/packaging/test/test_extraction.bats 
b/solr/packaging/test/test_extraction.bats
index 865298331a0..f5a8aeb2c90 100644
--- a/solr/packaging/test/test_extraction.bats
+++ b/solr/packaging/test/test_extraction.bats
@@ -22,7 +22,13 @@ setup_file() {
   if command -v docker >/dev/null 2>&1 && docker info >/dev/null 2>&1; then
     export TIKA_PORT=$((SOLR_PORT+5))
     docker run --rm -p ${TIKA_PORT}:9998 --name bats_tika -d 
apache/tika:3.2.3.0-full >/dev/null 2>&1 || true
-    echo "Tika Server started on port ${TIKA_PORT}" >&3
+    echo "Waiting for Tika Server to be ready on port ${TIKA_PORT}" >&3
+    if ! wait_for 120 3 curl -s -f "http://localhost:${TIKA_PORT}/tika"; -o 
/dev/null; then
+      export DOCKER_UNAVAILABLE=1
+      echo "WARNING: Tika Server did not become ready in time; Tika-dependent 
tests will be bypassed." >&3
+    else
+      echo "Tika Server is ready on port ${TIKA_PORT}" >&3
+    fi
   else
     export DOCKER_UNAVAILABLE=1
     echo "WARNING: Docker not available (CLI missing or daemon not running); 
Tika-dependent tests will be bypassed and marked as passed." >&3
diff --git a/solr/packaging/test/test_start_solr.bats 
b/solr/packaging/test/test_start_solr.bats
index 0dc0eb24802..82e4e7cef67 100644
--- a/solr/packaging/test/test_start_solr.bats
+++ b/solr/packaging/test/test_start_solr.bats
@@ -78,7 +78,7 @@ teardown() {
   solr assert --started http://localhost:${SOLR_PORT} --timeout 5000
 
   run cat ${SOLR_LOGS_DIR}/solr-${SOLR_PORT}-console.log
-  refute_output --partial 'Exception'
+  refute_output --partial 'Exception in thread'
 }
 
 @test "deprecated system properties converted to modern properties" {

Reply via email to