Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ def test_cancel_recording_produces_no_data(
assert_post_test_storage_state(case.storage_state_action)


@pytest.mark.skip(
reason=(
"Temporarily excluded from required integration baseline: "
"daemon process cleanup is unstable on staging."
)
)
@pytest.mark.parametrize("case", _CASES, ids=case_ids(_CASES))
@pytest.mark.parametrize("gap_s", [0, 10], ids=["no_gap", "10s_gap"])
def test_cancel_then_start_new_recording(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
DataDaemonTestCase(
duration_sec=5,
joint_count=4,
skip=True,
),
DataDaemonTestCase(
duration_sec=5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
)


@pytest.mark.skip
def test_shared_slot_reopen_after_stalled_descriptor_uploads_next_recording(
monkeypatch: pytest.MonkeyPatch,
clear_daemon_timer_stats,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ def test_online_daemon_running_exit_leaves_no_pids() -> None:
# Daemon must be fully gone — no lingering runner processes.


@pytest.mark.skip(
reason=(
"Temporarily excluded from required integration baseline: "
"daemon process cleanup is unstable on staging."
)
)
def test_online_daemon_running_exit_cleans_up_after_active_recording() -> None:
"""No daemon PIDs remain after ``online_daemon_running()`` exits mid-recording.

Expand Down Expand Up @@ -324,6 +330,12 @@ def test_online_daemon_running_exit_cleans_up_after_active_recording() -> None:
]


@pytest.mark.skip(
reason=(
"Temporarily excluded from required integration baseline: "
"daemon process cleanup is unstable on staging."
)
)
@pytest.mark.parametrize("case", _KILL_RESTART_CASES, ids=case_ids(_KILL_RESTART_CASES))
def test_sigkill_after_recording_allows_clean_restart(case: DataDaemonTestCase) -> None:
"""Daemon restarts cleanly and produces a new PID after SIGKILL post-recording.
Expand Down Expand Up @@ -368,6 +380,7 @@ def test_sigkill_after_recording_allows_clean_restart(case: DataDaemonTestCase)
logger.info("Restarted daemon pid=%d", pid_second)


@pytest.mark.skip
@pytest.mark.parametrize("case", _KILL_RESTART_CASES, ids=case_ids(_KILL_RESTART_CASES))
def test_sigkill_mid_recording_allows_clean_restart(case: DataDaemonTestCase) -> None:
"""Daemon restarts cleanly after SIGKILL interrupts an in-progress recording.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""

import psutil
import pytest

import neuracore as nc
from neuracore.data_daemon.helpers import get_daemon_pid_path
Expand All @@ -17,6 +18,12 @@
from tests.integration.platform.data_daemon.shared.runners import online_daemon_running


@pytest.mark.skip(
reason=(
"Temporarily excluded from required integration baseline: "
"daemon process cleanup is unstable on staging."
)
)
def test_ensure_single_daemon_process() -> None:
"""Verify that only one daemon process is spawned under parallel startup.

Expand Down
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