From 4b4b909e985168a1bacb014ca6605564d7055fde Mon Sep 17 00:00:00 2001 From: kzangeli Date: Fri, 5 Jun 2026 11:32:08 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20021=5F25=20=E2=80=94=20own=20expectation?= =?UTF-8?q?=20with=20both=20temporal=20entities?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 021_25 queries the temporal evolution with no entity-id filter (local=true, timerel=after 2020-07-01), so both entities its setup creates (021-06-A and 021-06-B) match. The test reused 021_06's expectation file, which only contains A because 021_06 queries with id=…021-06-A — a conforming broker returning B failed the comparison. New expectation vehicles-temporal-representation-021-25.jsonld carries A (as in the 021-06 file) plus B (the 2020-09 payload's instances); 021_25.robot now references it. Analysis recorded as testsuite-doubts.md #92. --- .../021_25.robot | 2 +- ...cles-temporal-representation-021-25.jsonld | 78 +++++++++++++++++++ testsuite-doubts.md | 20 +++++ 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 data/temporalEntities/expectations/vehicles-temporal-representation-021-25.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_25.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_25.robot index c8a03b88..394ffa5c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_25.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_25.robot @@ -14,7 +14,7 @@ Suite Teardown Delete Initial Temporal Entities *** Variables *** ${first_vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld ${second_vehicle_payload_file}= 2020-09-vehicle-temporal-representation.jsonld -${expectation_file}= vehicles-temporal-representation-021-06.jsonld +${expectation_file}= vehicles-temporal-representation-021-25.jsonld *** Test Cases *** diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-25.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-25.jsonld new file mode 100644 index 00000000..90447297 --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-25.jsonld @@ -0,0 +1,78 @@ +[ + { + "id": "urn:ngsi-ld:Vehicle:021-06-A", + "type": "Vehicle", + "fuelLevel": [ + { + "type": "Property", + "value": 40, + "observedAt": "2020-08-01T14:07:00Z" + }, + { + "type": "Property", + "value": 67, + "observedAt": "2020-08-01T12:03:00Z" + }, + { + "type": "Property", + "value": 53, + "observedAt": "2020-08-01T13:05:00Z" + } + ], + "speed": [ + { + "type": "Property", + "value": 100, + "observedAt": "2020-08-01T12:07:00Z" + }, + { + "type": "Property", + "value": 80, + "observedAt": "2020-08-01T12:05:00Z" + }, + { + "type": "Property", + "value": 120, + "observedAt": "2020-08-01T12:03:00Z" + } + ] + }, + { + "id": "urn:ngsi-ld:Vehicle:021-06-B", + "type": "Vehicle", + "speed": [ + { + "type": "Property", + "value": 120, + "observedAt": "2020-09-01T12:03:00Z" + }, + { + "type": "Property", + "value": 80, + "observedAt": "2020-09-01T12:05:00Z" + }, + { + "type": "Property", + "value": 100, + "observedAt": "2020-09-01T12:07:00Z" + } + ], + "fuelLevel": [ + { + "type": "Property", + "value": 67, + "observedAt": "2020-09-01T12:03:00Z" + }, + { + "type": "Property", + "value": 53, + "observedAt": "2020-09-01T13:05:00Z" + }, + { + "type": "Property", + "value": 40, + "observedAt": "2020-09-01T14:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/testsuite-doubts.md b/testsuite-doubts.md index 50417d0d..89734e79 100644 --- a/testsuite-doubts.md +++ b/testsuite-doubts.md @@ -2667,3 +2667,23 @@ doesn't match the URL id. `$.id` with the actual `${entity_id}` before PATCHing. Or omit the `id` from the fragment entirely (PATCH attrs doesn't need it). + + +## 92. `021_25` — reuses 021_06's expectation although it queries without an id filter + +**Hit:** `021_25` (Query All Temporal Entities With Local Flag) fails with +`Item root['urn:ngsi-ld:Vehicle:021-06-B'] added to dictionary`. + +**Analysis:** the suite's setup creates TWO temporal entities (021-06-A from +the 2020-08 payload, 021-06-B from the 2020-09 payload) — the same setup as +`021_06`. But where 021_06 queries with `id=…021-06-A` (so only A comes +back), 021_25 queries with **no** entity-id filter at all (`timerel=after`, +`timeAt=2020-07-01T12:05:00Z`, `local=true`). Both entities' instances lie +after the timeAt, so a conforming broker returns A **and** B. The test +nevertheless reuses 021_06's expectation file +(`vehicles-temporal-representation-021-06.jsonld`), which contains only A — +any broker that correctly returns B fails the comparison. + +**Fix:** dedicated expectation `vehicles-temporal-representation-021-25.jsonld` +containing both entities (A's instances as in the 021-06 file + B's instances +straight from the 2020-09 payload), and 021_25.robot pointed at it. -- GitLab