Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/integration-testing-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ jobs:
extra-deps: ""
- group: evaluation
path: tests_integ/evaluation
# These tests need OpenAI and Braintrust API keys, which this job
# doesn't have. The secure integ workflow runs them.
extra-args: --ignore=tests_integ/evaluation/test_third_party_adapters.py
timeout: 15
extra-deps: "strands-agents-evals"
- group: services
Expand Down Expand Up @@ -247,16 +250,17 @@ jobs:
BASELINE_TAG: ${{ needs.resolve-tag.outputs.tag }}
TEST_GROUP: ${{ matrix.group }}
PYTEST_PATH: ${{ matrix.path }}
PYTEST_EXTRA_ARGS: ${{ matrix.extra-args || '' }}
timeout-minutes: ${{ matrix.timeout }}
working-directory: /tmp/baseline-tests
# PYTEST_PATH comes from the job matrix and holds space-separated pytest
# path args; left unquoted intentionally so it word-splits.
# PYTEST_PATH and PYTEST_EXTRA_ARGS are unquoted on purpose so they
# split into separate pytest args.
run: |
echo "================================================"
echo "Library: bedrock-agentcore (PR branch source)"
echo "Test suite: $BASELINE_TAG tests_integ/$TEST_GROUP"
echo "================================================"
pytest $PYTEST_PATH \
pytest $PYTEST_PATH $PYTEST_EXTRA_ARGS \
-n auto --dist=loadscope \
-s --log-cli-level=INFO

Expand Down
15 changes: 15 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""Shared pytest configuration."""

import sys


def pytest_runtest_teardown(item):
"""Stop ragas' background telemetry thread once ragas is imported.

The thread calls ``time.sleep(1)`` in a loop. Patching ``time.sleep`` in a
test patches it for every thread, so the ragas thread's calls land on the
mock and break call-count assertions.
"""
analytics = sys.modules.get("ragas._analytics")
if analytics is not None:
analytics._analytics_batcher._running = False
Loading