mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
test(otel): keep proxy startup out of the per-test timeout in the excluded services matrix (#51759)
Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
5f381ad472
commit
03f14051b9
1 changed files with 15 additions and 15 deletions
|
|
@ -526,7 +526,7 @@ def unconfigured_rig(
|
|||
yield started
|
||||
|
||||
|
||||
@pytest.mark.timeout(120)
|
||||
@pytest.mark.timeout(120, func_only=True)
|
||||
@pytest.mark.parametrize("stream", [False, True], ids=["unary", "stream"])
|
||||
@pytest.mark.parametrize("client", CLIENTS)
|
||||
@pytest.mark.parametrize("endpoint", ENDPOINTS)
|
||||
|
|
@ -541,7 +541,7 @@ def test_tenant_trace_keeps_request_spans_without_datastore_spans(
|
|||
_assert_withheld(rig, sent, cursors)
|
||||
|
||||
|
||||
@pytest.mark.timeout(120)
|
||||
@pytest.mark.timeout(120, func_only=True)
|
||||
@pytest.mark.parametrize("endpoint", ["chat", "messages"])
|
||||
def test_cache_hit_twin_keeps_datastore_spans_off_the_tenant(rig: Rig, endpoint: Endpoint) -> None:
|
||||
marker: Final = _marker()
|
||||
|
|
@ -556,7 +556,7 @@ def test_cache_hit_twin_keeps_datastore_spans_off_the_tenant(rig: Rig, endpoint:
|
|||
_assert_tenant_mirrors(rig, _operator_trace_by_id(rig, trace_id, cursors), cursors)
|
||||
|
||||
|
||||
@pytest.mark.timeout(120)
|
||||
@pytest.mark.timeout(120, func_only=True)
|
||||
@pytest.mark.parametrize("endpoint", ENDPOINTS)
|
||||
def test_failed_upstream_call_keeps_datastore_spans_off_the_tenant(rig: Rig, endpoint: Endpoint) -> None:
|
||||
cursors: Final = rig.cursors()
|
||||
|
|
@ -578,7 +578,7 @@ def test_failed_upstream_call_keeps_datastore_spans_off_the_tenant(rig: Rig, end
|
|||
_assert_tenant_mirrors(rig, operator, cursors)
|
||||
|
||||
|
||||
@pytest.mark.timeout(120)
|
||||
@pytest.mark.timeout(120, func_only=True)
|
||||
def test_key_level_callback_vars_destination_is_filtered_too(rig: Rig, langfuse_vars: dict[str, JsonValue]) -> None:
|
||||
key: Final = rig.scenario.key(
|
||||
metadata={
|
||||
|
|
@ -595,7 +595,7 @@ def test_key_level_callback_vars_destination_is_filtered_too(rig: Rig, langfuse_
|
|||
_assert_withheld(rig, sent, cursors)
|
||||
|
||||
|
||||
@pytest.mark.timeout(120)
|
||||
@pytest.mark.timeout(120, func_only=True)
|
||||
@pytest.mark.parametrize("status", [403, 404])
|
||||
def test_rejecting_tenant_destination_leaves_serving_and_the_operator_trace_intact(rig: Rig, status: int) -> None:
|
||||
configure_sink(rig.sinks.tenant, status=status)
|
||||
|
|
@ -658,7 +658,7 @@ def _assert_tenant_never_saw_datastore_spans(rig: Rig, cursors: Cursors, traces:
|
|||
assert _db_systems(tenant) == set(), _names(tenant)
|
||||
|
||||
|
||||
@pytest.mark.timeout(300)
|
||||
@pytest.mark.timeout(300, func_only=True)
|
||||
def test_tenant_outage_during_a_mixed_burst_keeps_serving_and_never_leaks_datastore_spans(rig: Rig) -> None:
|
||||
cursors: Final = rig.cursors()
|
||||
configure_sink(rig.sinks.tenant, status=503)
|
||||
|
|
@ -675,7 +675,7 @@ def test_tenant_outage_during_a_mixed_burst_keeps_serving_and_never_leaks_datast
|
|||
_assert_withheld(rig, rig.raw("messages", _marker(), stream=True), after)
|
||||
|
||||
|
||||
@pytest.mark.timeout(300)
|
||||
@pytest.mark.timeout(300, func_only=True)
|
||||
def test_stalled_tenant_destination_during_a_burst_does_not_block_responses(rig: Rig) -> None:
|
||||
cursors: Final = rig.cursors()
|
||||
configure_sink(rig.sinks.tenant, paused=True)
|
||||
|
|
@ -689,7 +689,7 @@ def test_stalled_tenant_destination_during_a_burst_does_not_block_responses(rig:
|
|||
_assert_tenant_never_saw_datastore_spans(rig, cursors, traces)
|
||||
|
||||
|
||||
@pytest.mark.timeout(300)
|
||||
@pytest.mark.timeout(300, func_only=True)
|
||||
def test_killing_one_of_two_workers_mid_burst_keeps_the_filter_on_the_survivor(rig: Rig) -> None:
|
||||
workers: Final = eventually(rig.owned.worker_pids, lambda found: len(found) == 2, seconds=30)
|
||||
cursors: Final = rig.cursors()
|
||||
|
|
@ -746,7 +746,7 @@ def _assert_kept(rig: Rig, sent: Sent, cursors: Cursors) -> tuple[Span, ...]:
|
|||
return _assert_tenant_kept(rig, operator[0]["trace_id"], cursors, needs_model_span=True)
|
||||
|
||||
|
||||
@pytest.mark.timeout(120)
|
||||
@pytest.mark.timeout(120, func_only=True)
|
||||
@pytest.mark.parametrize("stream", [False, True], ids=["unary", "stream"])
|
||||
@pytest.mark.parametrize("client", CLIENTS)
|
||||
@pytest.mark.parametrize("endpoint", ENDPOINTS)
|
||||
|
|
@ -761,7 +761,7 @@ def test_unconfigured_tenant_trace_keeps_datastore_spans(
|
|||
_assert_kept(unconfigured_rig, sent, cursors)
|
||||
|
||||
|
||||
@pytest.mark.timeout(120)
|
||||
@pytest.mark.timeout(120, func_only=True)
|
||||
@pytest.mark.parametrize("endpoint", ["chat", "messages"])
|
||||
def test_unconfigured_cache_hit_twin_keeps_datastore_spans(unconfigured_rig: Rig, endpoint: Endpoint) -> None:
|
||||
cursors: Final = unconfigured_rig.cursors()
|
||||
|
|
@ -813,7 +813,7 @@ def test_unconfigured_cache_hit_twin_keeps_datastore_spans(unconfigured_rig: Rig
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.timeout(120)
|
||||
@pytest.mark.timeout(120, func_only=True)
|
||||
@pytest.mark.parametrize("endpoint", ENDPOINTS)
|
||||
def test_unconfigured_failed_upstream_keeps_datastore_spans(unconfigured_rig: Rig, endpoint: Endpoint) -> None:
|
||||
cursors: Final = unconfigured_rig.cursors()
|
||||
|
|
@ -839,7 +839,7 @@ def test_unconfigured_failed_upstream_keeps_datastore_spans(unconfigured_rig: Ri
|
|||
_assert_tenant_kept(unconfigured_rig, trace_id, cursors)
|
||||
|
||||
|
||||
@pytest.mark.timeout(120)
|
||||
@pytest.mark.timeout(120, func_only=True)
|
||||
@pytest.mark.parametrize("status", [403, 404])
|
||||
def test_unconfigured_rejecting_tenant_destination_recovers(unconfigured_rig: Rig, status: int) -> None:
|
||||
configure_sink(unconfigured_rig.sinks.tenant, status=status)
|
||||
|
|
@ -858,7 +858,7 @@ def test_unconfigured_rejecting_tenant_destination_recovers(unconfigured_rig: Ri
|
|||
_assert_kept(unconfigured_rig, recovered, after)
|
||||
|
||||
|
||||
@pytest.mark.timeout(120)
|
||||
@pytest.mark.timeout(120, func_only=True)
|
||||
def test_unconfigured_key_level_destination_keeps_datastore_spans(
|
||||
unconfigured_rig: Rig, langfuse_vars: dict[str, JsonValue]
|
||||
) -> None:
|
||||
|
|
@ -900,7 +900,7 @@ def _assert_tenant_kept_the_burst(rig: Rig, cursors: Cursors, traces: set[str])
|
|||
assert not missing_redis, f"redis spans missing from tenant burst traces: {missing_redis}, {_names(burst)}"
|
||||
|
||||
|
||||
@pytest.mark.timeout(300)
|
||||
@pytest.mark.timeout(300, func_only=True)
|
||||
def test_unconfigured_tenant_outage_during_a_mixed_burst(unconfigured_rig: Rig) -> None:
|
||||
cursors: Final = unconfigured_rig.cursors()
|
||||
configure_sink(unconfigured_rig.sinks.tenant, status=503)
|
||||
|
|
@ -917,7 +917,7 @@ def test_unconfigured_tenant_outage_during_a_mixed_burst(unconfigured_rig: Rig)
|
|||
_assert_kept(unconfigured_rig, unconfigured_rig.raw("messages", _marker(), stream=True), after)
|
||||
|
||||
|
||||
@pytest.mark.timeout(300)
|
||||
@pytest.mark.timeout(300, func_only=True)
|
||||
def test_unconfigured_killing_one_of_two_workers_keeps_the_fan_out(unconfigured_rig: Rig) -> None:
|
||||
workers: Final = eventually(unconfigured_rig.owned.worker_pids, lambda found: len(found) == 2, seconds=30)
|
||||
cursors: Final = unconfigured_rig.cursors()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue