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 c8a03b8835c368ebeaf410396bebb8391e090b92..394ffa5ce658e22662094ce35bf3ddc147c24bee 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 0000000000000000000000000000000000000000..90447297da1c399aa3f84867d28e915116190ade --- /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 50417d0d9ed842c484c57b911fbd007b17b2d9cc..89734e7911228e6f1ce68db5b7bc3c9b34114684 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.