Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in GET v2/entities with the "mq" query param fails randomly if we use a vector in "metadata values" #2446

Closed
iariasleon opened this issue Aug 11, 2016 · 5 comments
Assignees
Milestone

Comments

@iariasleon
Copy link
Contributor

iariasleon commented Aug 11, 2016

in GET v2/entities with the "mq" query param fails randomly if we use a vector in "metadata values". In execution of tests in group, if the test is executed alone never fails. The problem is probably in the stack.

Entity request

url: POST http://localhost:1026/v2/entities
headers:
    Content-Type: application/json
    Fiware-Service: s01901pep2cbv2
    Fiware-ServicePath: /ssp1
payload: {"type": "t96C", "id": "room1",  "temperature":{"type": "celsius", "metadata": {"very_cold": {"value": ["one","two","three"], "type": "alarm"}}, "value": 45}}

GET request

url: GET http://localhost:1026/v2/entities?mq=temperature.very_cold==one&options=count
headers:
    Fiware-Service: s01901pep2cbv2
    Fiware-ServicePath: /ssp1

GET response

`http code: 200 - OK
headers:
   content-length: 136
   fiware-total-count: 1
   server: nginx
   fiware-correlator: f2b421ba-5fad-11e6-b8d3-fa163e026cb4
   connection: keep-alive
   date: Thu, 11 Aug 2016 10:25:38 GMT
   content-type: application/json
payload: [{"id":"room1","type":"t96C","temperature":{"type":"celsius","value":45,"metadata":{"very_cold":{"type":"alarm","one","two","three"}}}}]

expected response

http code: 200 - OK
payload: [{"id":"room1","type":"nQIa","temperature":{"type":"celsius","value":45,"metadata":{"very_cold":{"type":"alarm","value":["one","two","three"]}}}}]
@iariasleon iariasleon added this to the 1.3.0 milestone Aug 11, 2016
@kzangeli
Copy link
Member

Might be an uninitialized variable ...

@kzangeli
Copy link
Member

I've seen and fixed a similar bug in recent branches, still not in develop.
[ might have thrown away that modification when rolling back the branch for #2223 ]
However, I would wait with this issue to see if it still falis once th PR for #2223 is merged.

@kzangeli kzangeli self-assigned this Aug 29, 2016
@fgalan fgalan assigned iariasleon and unassigned kzangeli Aug 29, 2016
@fgalan
Copy link
Member

fgalan commented Aug 29, 2016

New functest added in PR #2475 but it seems that the bug has been previously fixed in some other PR.

@iariasleon please have a look and close if you find this ok.

@iariasleon
Copy link
Contributor Author

Tested in Component environment and the failure does not ocurr, I would like to test on INT environment where was detected.

CB installed in component:

  "version" : "1.2.0-next"
  "git_hash" : "208dbd7d4d3cda50dd6688b93a945328fb775f6b",

@iariasleon
Copy link
Contributor Author

LGTM
Tested on INT environment and the failure is not detected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants