Loading data/temporalEntities/expectations/vehicle-temporal-representation-update.jsonld +21 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,11 @@ "id":"urn:ngsi-ld:Vehicle:randomUUID", "type":"Vehicle", "speed":[ { "type":"Property", "value":120, "observedAt":"2020-09-01T12:03:00Z" }, { "type":"Property", "value":121, Loading @@ -12,6 +17,11 @@ "value":80, "observedAt":"2020-09-01T12:05:00Z" }, { "type":"Property", "value":80, "observedAt":"2020-09-01T12:05:00Z" }, { "type":"Property", "value":100, Loading @@ -24,6 +34,16 @@ "value":67, "observedAt":"2020-09-01T12:03:00Z" }, { "type":"Property", "value":67, "observedAt":"2020-09-01T12:03:00Z" }, { "type":"Property", "value":53, "observedAt":"2020-09-01T13:05:00Z" }, { "type":"Property", "value":53, Loading testsuite-doubts.md +22 −0 Original line number Diff line number Diff line Loading @@ -3236,3 +3236,25 @@ expect 1. Verified by tracing each leaked entity id in the robot **Fix:** teardown deletes the current-state entity too — `Delete Entity` before `Delete Temporal Representation Of Entity` (that order also purges the deletion's own tombstone rows from the temporal store). ## 94. `008_01_01` — expectation assumes a second temporal POST overwrites same-observedAt instances **Hit:** `Item root['speed'][1] added to iterable` (and friends) — the broker returns more Attribute instances than the expectation contains. **Analysis:** the test POSTs `/temporal/entities` twice for the same entity: the create payload (`speed` 120@12:03, 80@12:05) and an "update" payload (`speed` 121@12:03, 80@12:05, 100@12:07). The expectation file is the update payload itself — i.e. it assumes the second POST *replaced* the instances sharing an `observedAt` (120@12:03 → 121@12:03) and deduplicated the identical ones (80@12:05). That is current-state update semantics applied to the Temporal Evolution. Per TS 104-175 § 5.6.11.4, when the entity already exists, the provided Attribute instances "shall be **added** to the existing Temporal Representation" — instance identity is the system-generated `instanceId`, never `observedAt`, and the evolution is append-only. A conforming broker therefore returns the union: 5 `speed` instances (120@12:03, 121@12:03, 80@12:05 ×2, 100@12:07) and 6 `fuelLevel` instances. **Fix:** the expectation now carries the full union (including the duplicate same-value/same-observedAt instances, which exist as distinct `instanceId`s). Loading
data/temporalEntities/expectations/vehicle-temporal-representation-update.jsonld +21 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,11 @@ "id":"urn:ngsi-ld:Vehicle:randomUUID", "type":"Vehicle", "speed":[ { "type":"Property", "value":120, "observedAt":"2020-09-01T12:03:00Z" }, { "type":"Property", "value":121, Loading @@ -12,6 +17,11 @@ "value":80, "observedAt":"2020-09-01T12:05:00Z" }, { "type":"Property", "value":80, "observedAt":"2020-09-01T12:05:00Z" }, { "type":"Property", "value":100, Loading @@ -24,6 +34,16 @@ "value":67, "observedAt":"2020-09-01T12:03:00Z" }, { "type":"Property", "value":67, "observedAt":"2020-09-01T12:03:00Z" }, { "type":"Property", "value":53, "observedAt":"2020-09-01T13:05:00Z" }, { "type":"Property", "value":53, Loading
testsuite-doubts.md +22 −0 Original line number Diff line number Diff line Loading @@ -3236,3 +3236,25 @@ expect 1. Verified by tracing each leaked entity id in the robot **Fix:** teardown deletes the current-state entity too — `Delete Entity` before `Delete Temporal Representation Of Entity` (that order also purges the deletion's own tombstone rows from the temporal store). ## 94. `008_01_01` — expectation assumes a second temporal POST overwrites same-observedAt instances **Hit:** `Item root['speed'][1] added to iterable` (and friends) — the broker returns more Attribute instances than the expectation contains. **Analysis:** the test POSTs `/temporal/entities` twice for the same entity: the create payload (`speed` 120@12:03, 80@12:05) and an "update" payload (`speed` 121@12:03, 80@12:05, 100@12:07). The expectation file is the update payload itself — i.e. it assumes the second POST *replaced* the instances sharing an `observedAt` (120@12:03 → 121@12:03) and deduplicated the identical ones (80@12:05). That is current-state update semantics applied to the Temporal Evolution. Per TS 104-175 § 5.6.11.4, when the entity already exists, the provided Attribute instances "shall be **added** to the existing Temporal Representation" — instance identity is the system-generated `instanceId`, never `observedAt`, and the evolution is append-only. A conforming broker therefore returns the union: 5 `speed` instances (120@12:03, 121@12:03, 80@12:05 ×2, 100@12:07) and 6 `fuelLevel` instances. **Fix:** the expectation now carries the full union (including the duplicate same-value/same-observedAt instances, which exist as distinct `instanceId`s).