Skip to content

Commit

Permalink
Log each test in tests/load
Browse files Browse the repository at this point in the history
  • Loading branch information
burnash committed Nov 8, 2024
1 parent 93a39d4 commit a0e665e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test_local_destinations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,15 @@ jobs:
- name: Run tests Linux
run: |
eval "$(ssh-agent -s)"
poetry run pytest --durations=0 tests/load --ignore tests/load/sources
poetry run pytest --durations=0 tests/cli
poetry run pytest tests/load --ignore tests/load/sources
poetry run pytest tests/cli
env:
DESTINATION__POSTGRES__CREDENTIALS: postgresql://loader:loader@localhost:5432/dlt_data
DESTINATION__QDRANT__CREDENTIALS__location: http://localhost:6333
DESTINATION__FILESYSTEM__CREDENTIALS__SFTP_PORT: 2222
DESTINATION__FILESYSTEM__CREDENTIALS__SFTP_USERNAME: foo
DESTINATION__FILESYSTEM__CREDENTIALS__SFTP_PASSWORD: pass


- name: Stop weaviate
if: always()
run: docker compose -f "tests/load/weaviate/docker-compose.yml" down -v
Expand Down
9 changes: 9 additions & 0 deletions tests/load/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,12 @@ def all_buckets_env(request) -> Iterator[str]:
bucket_url = request.param
os.environ["DESTINATION__FILESYSTEM__BUCKET_URL"] = bucket_url
yield bucket_url


# temporary log duration of each test
def pytest_runtest_logreport(report):
if report.when == 'call':
duration = report.duration
nodeid = report.nodeid
status = report.outcome
print(f"\n{nodeid} {status.upper()} in {duration:.2f} seconds")

0 comments on commit a0e665e

Please sign in to comment.