Skip to content

fix(tests): skip live trace-import tests when the lookback window is empty #104

Description

@satyaborg

Summary

The live trace-import tests default to a 7-day lookback. When the connected project has no traces in that window, they fail on an empty-data assertion instead of skipping, which is indistinguishable from a product regression.

Evidence

Against a project whose newest observation was 23 days old:

AssertionError: langfuse live response returned no records.
Set LANGFUSE_SINCE to a window with known trace data.
assert []

All three data-dependent tests failed this way. Re-running with LANGFUSE_SINCE=45d moved them past the data check and surfaced the real defect underneath (#102).

Location

tests/integration/test_live_trace_import_contracts.py:72

return os.environ.get(f"{provider.upper()}_SINCE") or "7d"

Fix

Skip with an explicit reason when the lookback window returns no records, rather than asserting. An absent fixture in the connected project is an environment condition, not a failure. Optionally widen the default window.

Why it matters

An empty window masks real regressions. The first live run of this suite reported three failures, only two of which were genuine, and the genuine cause stayed hidden behind the empty-data assertion until the window was widened.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions