Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/integration/platform/data_daemon/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,21 @@ def cleanup_profiles():
cleanup_test_profiles()


@pytest.fixture(autouse=True)
def skip_marked_cases(request: pytest.FixtureRequest) -> None:
"""Skip any parametrized case flagged with ``skip=True``.

Lets unstable or not-yet-validated workloads remain documented in the
suite's test-case tables (rather than being commented out) while still
being excluded from execution.
"""
if "case" not in request.fixturenames:
return
case = request.getfixturevalue("case")
if getattr(case, "skip", False):
pytest.skip("case marked skip=True")


@pytest.fixture(autouse=True)
def apply_batch_start_storage_state(request: pytest.FixtureRequest) -> None:
"""Apply local storage cleanup once before the first case in each batch.
Expand Down
18 changes: 18 additions & 0 deletions tests/integration/platform/data_daemon/daemon_test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
video_count=1,
image_height=64,
image_width=64,
skip=True,
),
DataDaemonTestCase(
duration_sec=10,
Expand All @@ -116,6 +117,7 @@
context_duration_mode=DURATION_MODE_VARIABLE,
video_fps=30,
joint_fps=15,
skip=True,
),
DataDaemonTestCase(
duration_sec=10,
Expand All @@ -130,6 +132,7 @@
producer_channels=PRODUCER_PER_THREAD,
parallel_contexts=2,
mode=MODE_STAGGERED,
skip=True,
),
DataDaemonTestCase(
duration_sec=10,
Expand All @@ -145,6 +148,7 @@
parallel_contexts=2,
mode=MODE_STAGGERED,
timestamp_mode=TIMESTAMP_MODE_REAL,
skip=True,
),
# DataDaemonTestCase(
# duration_sec=10,
Expand Down Expand Up @@ -193,6 +197,7 @@
mode=MODE_STAGGERED,
timestamp_mode=TIMESTAMP_MODE_REAL,
wait=True,
skip=True,
),
)

Expand All @@ -207,6 +212,7 @@
recording_count=5,
context_duration_mode=DURATION_MODE_FIXED,
joint_fps=210,
skip=True,
),
# High number of medium-throughput robots with synchronized
# recordings. Tests: multi-robot contention, mixed data types,
Expand All @@ -224,6 +230,7 @@
producer_channels=PRODUCER_PER_THREAD,
context_duration_mode=DURATION_MODE_VARIABLE,
video_fps=30,
skip=True,
),
# Large number of joints without cameras (1000 joints)
# Tests: high joint dimensionality, memory efficiency, sensor-only workload
Expand All @@ -246,6 +253,7 @@
parallel_contexts=2,
recording_count=16,
context_duration_mode=DURATION_MODE_FIXED,
skip=True,
),
DataDaemonTestCase(
duration_sec=300,
Expand All @@ -259,6 +267,7 @@
video_fps=30,
joint_fps=15,
timestamp_mode=TIMESTAMP_MODE_STOCHASTIC,
skip=True,
),
# DataDaemonTestCase(
# duration_sec=10,
Expand Down Expand Up @@ -338,6 +347,7 @@
producer_channels=PRODUCER_PER_THREAD,
context_duration_mode=DURATION_MODE_VARIABLE,
video_fps=30,
skip=True,
),
DataDaemonTestCase(
duration_sec=20,
Expand All @@ -352,6 +362,7 @@
context_duration_mode=DURATION_MODE_VARIABLE,
video_fps=30,
wait=True,
skip=True,
),
# Large number of joints without cameras (1000 joints)
# Tests: high joint dimensionality, memory efficiency, sensor-only workload
Expand All @@ -361,6 +372,7 @@
video_count=0,
parallel_contexts=1,
recording_count=3,
skip=True,
),
DataDaemonTestCase(
duration_sec=30,
Expand All @@ -369,6 +381,7 @@
parallel_contexts=1,
recording_count=3,
wait=True,
skip=True,
),
# 3x longer duration recordings
# Tests: long-running stability, memory leak detection, large dataset
Expand All @@ -382,6 +395,7 @@
parallel_contexts=2,
recording_count=16,
context_duration_mode=DURATION_MODE_FIXED,
skip=True,
),
DataDaemonTestCase(
duration_sec=300,
Expand All @@ -393,6 +407,7 @@
recording_count=16,
context_duration_mode=DURATION_MODE_FIXED,
wait=True,
skip=True,
),
DataDaemonTestCase(
duration_sec=300,
Expand All @@ -406,6 +421,7 @@
video_fps=30,
joint_fps=15,
timestamp_mode=TIMESTAMP_MODE_STOCHASTIC,
skip=True,
),
DataDaemonTestCase(
duration_sec=300,
Expand All @@ -420,6 +436,7 @@
joint_fps=15,
timestamp_mode=TIMESTAMP_MODE_STOCHASTIC,
wait=True,
skip=True,
),
# DataDaemonTestCase(
# duration_sec=10,
Expand Down Expand Up @@ -455,5 +472,6 @@
producer_channels=PRODUCER_PER_THREAD,
timestamp_mode=TIMESTAMP_MODE_STOCHASTIC,
wait=False,
skip=True,
),
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

from tests.integration.platform.data_daemon.daemon_test_cases import (
PRE_NETWORK_INTEGRITY_CASES,
NETWORK_INTEGRITY_CASES,
)
from tests.integration.platform.data_daemon.shared.assertions import (
assert_exactly_one_daemon_pid,
Expand Down Expand Up @@ -37,7 +37,7 @@
)

_CASES = DataDaemonTestBatch(
cases=PRE_NETWORK_INTEGRITY_CASES,
cases=NETWORK_INTEGRITY_CASES,
storage_state_action=STORAGE_STATE_DELETE,
stop_method=STOP_METHOD_CLI,
).as_cases()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ class DataDaemonTestCase:
timestamps computed from ``timestamp_start_s + frame_index / fps``.
``"real"`` omits the ``timestamp`` argument so the logging API uses
the wall-clock time at the moment each frame is logged.
skip: When ``True``, the case is skipped at collection time instead of
being executed. Lets unstable or not-yet-validated workloads stay
in the suite (documented and discoverable) without running. A
batch with ``skip=True`` forces every case to skip regardless of
this per-case value.

Note:
``mode="staggered"`` and ``context_duration_mode="variable"``:
Expand Down Expand Up @@ -178,6 +183,7 @@ class DataDaemonTestCase:
joint_fps: int = 60
video_fps: int = 60
timestamp_mode: TimestampMode = TIMESTAMP_MODE_MANUAL
skip: bool = False

@property
def has_video(self) -> bool:
Expand Down Expand Up @@ -226,6 +232,9 @@ class DataDaemonTestBatch:
``DataDaemonTestCase.stop_method``.
timestamp_mode: Optional batch-level override for timestamp mode. When
unset, each case keeps its own ``timestamp_mode``.
skip: When ``True``, every case in the batch is skipped at collection
time. When ``False`` (default), each case keeps its own per-case
``skip`` value, so individual cases can still opt out.
"""

cases: tuple[DataDaemonTestCase, ...]
Expand All @@ -234,6 +243,7 @@ class DataDaemonTestBatch:
preserve_artifacts_per_test: bool = False
stop_method: StopMethod = STOP_METHOD_CLI
timestamp_mode: TimestampMode | None = None
skip: bool = False

def as_cases(self) -> list[DataDaemonTestCase]:
"""Return cases with batch-level infrastructure params applied."""
Expand All @@ -245,6 +255,8 @@ def as_cases(self) -> list[DataDaemonTestCase]:
}
if self.timestamp_mode is not None:
batch_overrides["timestamp_mode"] = self.timestamp_mode
if self.skip:
batch_overrides["skip"] = True
return [
DataDaemonTestCase(**{
**{
Expand Down
Loading