test(v1): lock reconnect and disconnect-no-alarm behavior; close T-203
Adds a mid-stream drop recovery test and a pipeline test proving a disconnected frame yields no events and interrupts a pending suspect (stream loss never alarms). Live preview and fall detection on the real Hikvision stream were confirmed on Windows. 74 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -121,6 +121,22 @@ def test_pipeline_from_config_uses_runtime_version_for_confirmed_event():
|
||||
assert result.events[0].config_version == config.runtime_config_version
|
||||
|
||||
|
||||
def test_disconnect_interrupts_suspect_without_alarm():
|
||||
pipeline, machine = _pipeline([(_pose(),), (_pose(horizontal=True),)])
|
||||
|
||||
pipeline.process(_packet(0.0))
|
||||
pipeline.process(_packet(0.1))
|
||||
assert machine.state_of("P-0001") is FallState.SUSPECT
|
||||
|
||||
outage = pipeline.process(
|
||||
FramePacket(image=None, timestamp_monotonic=1.0, status=SourceStatus.RETRYING)
|
||||
)
|
||||
|
||||
assert outage.events == ()
|
||||
assert outage.people == ()
|
||||
assert machine.state_of("P-0001") is FallState.NORMAL
|
||||
|
||||
|
||||
def test_from_config_gives_each_run_a_unique_event_id():
|
||||
config = _config()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user