fix(focas-tests): honour fixture endpoint + fix mock timer endianness (9F/1P → 10/10) #450

Merged
dohertj2 merged 1 commits from fix/focas-integration-topology-and-timer into master 2026-07-15 05:52:05 -04:00
Owner

Integration-sweep follow-up #3. Two test/fixture bugs, no OtOpcUa driver change: (1) tests hardcoded focas://127.0.0.1:8193 instead of honouring the fixture's OTOPCUA_FOCAS_SIM_ENDPOINT → against a remote fixture the driver dialed localhost/KeyNotFound; now derived from fixture DeviceUri (recovered 8/9). (2) focas-mock's _wire_timer encoded the timer big-endian, but cnc_rdtimer's minute/msec are little-endian on real hardware (live-31i-B-validated; the driver's ParseTimer decodes LE) — mock now emits LE. Suite 10/10.

Integration-sweep follow-up #3. Two test/fixture bugs, no OtOpcUa driver change: (1) tests hardcoded focas://127.0.0.1:8193 instead of honouring the fixture's OTOPCUA_FOCAS_SIM_ENDPOINT → against a remote fixture the driver dialed localhost/KeyNotFound; now derived from fixture DeviceUri (recovered 8/9). (2) focas-mock's _wire_timer encoded the timer big-endian, but cnc_rdtimer's minute/msec are little-endian on real hardware (live-31i-B-validated; the driver's ParseTimer decodes LE) — mock now emits LE. Suite 10/10.
dohertj2 added 1 commit 2026-07-15 05:51:56 -04:00
fix(focas-tests): honour fixture endpoint + fix mock timer endianness (9F/1P -> 10/10)
v2-ci / build (pull_request) Successful in 4m31s
v2-ci / unit-tests (pull_request) Failing after 10m26s
7982043673
Two test/fixture bugs; NO OtOpcUa driver change.

1. Topology: FocasSimFixture reads an env-overridable endpoint
   (OTOPCUA_FOCAS_SIM_ENDPOINT, default localhost:8193) and exposes Host/Port,
   but WireBackendTests + WireBackendCoverageTests hardcoded
   focas://127.0.0.1:8193. Against a remote fixture the skip-gate passed
   (remote reachable) but the driver dialed localhost -> KeyNotFound. Added a
   DeviceUri property to the fixture; each test now derives DeviceHost from it.
   Recovered 8 of 9.

2. Mock timer endianness (surfaced once #1 let the tests reach the mock): the
   last failure read 60397977600 for a 3600 s power-on timer (= 0x3C000000 x 60).
   The focas-mock's _wire_timer encoded the minute/msec fields big-endian (_u32),
   but cnc_rdtimer's timer fields are LITTLE-endian on real hardware — a
   documented, live-31i-B-validated quirk that FocasWireClient.ParseTimer decodes
   LE (docs/plans/2026-06-25-focas-pdu-v3-30i-b-support.md). The driver was
   correct; the mock was wrong. _wire_timer now emits little-endian (_u32_le).

Suite 9F/1P -> 10/10 against the remote fixture at ~/otopcua-focas.
Integration-sweep follow-up #3.
dohertj2 merged commit 18481f3d11 into master 2026-07-15 05:52:05 -04:00
Sign in to join this conversation.