Commit f2661bf0 authored by kzangeli's avatar kzangeli
Browse files

Merge branch 'fix/021-25-local-query-expectation' into integration/all-fixes

# Conflicts:
#	testsuite-doubts.md
parents ec05b910 4b4b909e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 ***
+78 −0
Original line number Diff line number Diff line
[
  {
    "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
+20 −0
Original line number Diff line number Diff line
@@ -3191,3 +3191,23 @@ with the string `"urn:ngsi-ld:null"`:

- 020-19 (normalized): `"value": "urn:ngsi-ld:null"`
- 020-20 (temporalValues): `[ "urn:ngsi-ld:null", "…" ]`


## 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.