Skip to content

Commit 06cf090

Browse files
test: expose voice daemon startup diagnostics
1 parent ae646cb commit 06cf090

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

‎tests/test_voice_service.py‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,14 +287,19 @@ def test_explicit_device_rejects_an_already_running_service_on_another_device(
287287

288288
def test_start_status_stop_manage_a_hidden_daemon(tmp_path: Path) -> None:
289289
state = tmp_path / "daemon.json"
290-
started = start_voice_service(
291-
provider=_fake_provider(tmp_path),
292-
device="cuda",
293-
require_cuda=True,
294-
idle_timeout=30,
295-
state_path=state,
296-
startup_timeout=20,
297-
)
290+
try:
291+
started = start_voice_service(
292+
provider=_fake_provider(tmp_path),
293+
device="cuda",
294+
require_cuda=True,
295+
idle_timeout=30,
296+
state_path=state,
297+
startup_timeout=20,
298+
)
299+
except Exception as error:
300+
log = state.parent / "voice-service.log"
301+
diagnostics = log.read_text(encoding="utf-8", errors="replace") if log.is_file() else "<missing>"
302+
pytest.fail(f"{error}\nvoice-service.log:\n{diagnostics}")
298303
try:
299304
assert started["running"] is True
300305
assert started["already_running"] is False

0 commit comments

Comments
 (0)