Apache Solr open-source search software
Fix flaky BATS integration tests for extraction (#4303)
Jan Høydahl5aad2a757faa
diff --git a/solr/packaging/test/test_extraction.bats b/solr/packaging/test/test_extraction.batsindex 12c4b72840a..4b8e62ae59c 100644--- a/solr/packaging/test/test_extraction.bats+++ b/solr/packaging/test/test_extraction.bats@@ -41,7 +41,13 @@ setup_file() {if command -v docker >/dev/null 2>&1 && docker info >/dev/null 2>&1; thenexport 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+ fielseexport DOCKER_UNAVAILABLE=1echo "WARNING: Docker not available (CLI missing or daemon not running); Tika-dependent tests will be bypassed." >&3diff --git a/solr/packaging/test/test_start_solr.bats b/solr/packaging/test/test_start_solr.batsindex ef25ea32ee7..a24ceadd24c 100644--- a/solr/packaging/test/test_start_solr.bats+++ b/solr/packaging/test/test_start_solr.bats@@ -80,7 +80,7 @@ teardown() {solr assert --started http://localhost:${SOLR_PORT} --timeout 5000run 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" {