diff --git a/justfile b/justfile index 44241869..0665005b 100644 --- a/justfile +++ b/justfile @@ -51,7 +51,16 @@ test-int-sqlite: # Note: Uses timeout due to FastMCP Client + asyncpg cleanup hang (tests pass, process hangs on exit) # See: https://github.com/jlowin/fastmcp/issues/1311 test-int-postgres: - timeout --signal=KILL 600 bash -c 'BASIC_MEMORY_TEST_POSTGRES=1 uv run pytest -p pytest_mock -v --no-cov test-int' || test $? -eq 137 + #!/usr/bin/env bash + set -euo pipefail + # Use gtimeout (macOS/Homebrew) or timeout (Linux) + TIMEOUT_CMD=$(command -v gtimeout || command -v timeout || echo "") + if [[ -n "$TIMEOUT_CMD" ]]; then + $TIMEOUT_CMD --signal=KILL 600 bash -c 'BASIC_MEMORY_TEST_POSTGRES=1 uv run pytest -p pytest_mock -v --no-cov test-int' || test $? -eq 137 + else + echo "⚠️ No timeout command found, running without timeout..." + BASIC_MEMORY_TEST_POSTGRES=1 uv run pytest -p pytest_mock -v --no-cov test-int + fi # Reset Postgres test database (drops and recreates schema) # Useful when Alembic migration state gets out of sync during development