Skip to content

Commit

Permalink
chore(weave): Add pytest retry (#2919)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong authored Nov 6, 2024
1 parent 5ce195a commit 9407a60
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def tests(session, shard):

session.run(
"pytest",
"--strict-markers",
"--cov=weave",
"--cov-report=html",
"--cov-branch",
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ test = [
"pytest-cov>=5.0.0",
"pytest-xdist>=3.1.0",
"pytest-rerunfailures>=12.0",
"pytest-rerunfailures>=14.0",
"clickhouse_connect==0.7.0",
"fastapi>=0.110.0",
"sqlparse==0.5.0",
Expand Down
6 changes: 3 additions & 3 deletions tests/integrations/google_ai_studio/google_ai_studio_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def assert_correct_summary(summary: dict, trace_name: str):
assert summary["weave"]["latency_ms"] > 0


@pytest.mark.retry(max_attempts=5, delay=5)
@pytest.mark.flaky(reruns=5, reruns_delay=2)
@pytest.mark.skip_clickhouse_client
def test_content_generation(client):
import google.generativeai as genai
Expand All @@ -69,7 +69,7 @@ def test_content_generation(client):
assert_correct_summary(call.summary, trace_name)


@pytest.mark.retry(max_attempts=5, delay=5)
@pytest.mark.flaky(reruns=5, reruns_delay=2)
@pytest.mark.skip_clickhouse_client
def test_content_generation_stream(client):
import google.generativeai as genai
Expand All @@ -95,7 +95,7 @@ def test_content_generation_stream(client):
assert_correct_summary(call.summary, trace_name)


@pytest.mark.retry(max_attempts=5, delay=5)
@pytest.mark.flaky(reruns=5, reruns_delay=2)
@pytest.mark.asyncio
@pytest.mark.skip_clickhouse_client
async def test_content_generation_async(client):
Expand Down

0 comments on commit 9407a60

Please sign in to comment.