We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not a very important bug (as initial notifications are not very important)... but a bug after all :)
This is the .test script that raises the problem:
--NAME-- BUG REPORT: dateModified and dateCreated are not included in inital notification --SHELL-INIT-- dbInit CB brokerStart CB accumulatorStart --pretty-print --SHELL-- echo "01.Create entity E1/T" echo "======================================================================================================" payload='{ "id": "E1", "type": "T", "A": { "value": "foo", "type": "Text" } }' orionCurl --url '/v2/entities' --payload "$payload" echo echo echo "02. Create sub E.*/T with with dateModified and dateCreated in notification.attrs" echo "=================================================================================" payload='{ "subject": { "entities": [ { "idPattern": ".*", "type": "T" } ] }, "notification": { "http": {"url": "http://localhost:'$LISTENER_PORT'/notify"}, "attrs": [ "dateModified", "dateCreated", "*" ] } }' orionCurl --url /v2/subscriptions --payload "$payload" echo echo echo "03. Dump & reset accumulator shows the bug: dateModified and dateCreated are not included" echo "=========================================================================================" accumulatorDump accumulatorReset echo echo echo "04. But we can check that they are there, with a GET /v2/entities/E1/attrs?attrs=dateCreated,dateModified,* request" echo "===================================================================================================================" orionCurl --url '/v2/entities/E1/attrs?attrs=dateCreated,dateModified,*' echo echo echo "04. ... and also in regular notifications (update entity and dump accumulator)" echo "==============================================================================" payload='{ "A": { "value": "bar", "type": "Text" } }' orionCurl --url '/v2/entities/E1/attrs' --payload "$payload" echo echo accumulatorDump accumulatorReset echo echo --REGEXPECT-- TBD --TEARDOWN-- brokerStop CB dbDrop CB
The output of the .test in something like this:
01.Create entity E1/T ====================================================================================================== HTTP/1.1 201 Created Content-Length: 0 Location: /v2/entities/E1?type=T Fiware-Correlator: 07a03566-6027-11e8-83de-000c29173617 Date: Fri, 25 May 2018 14:22:18 GMT 02. Create sub E.*/T with with dateModified and dateCreated in notification.attrs ================================================================================= HTTP/1.1 201 Created Content-Length: 0 Location: /v2/subscriptions/5b081c1ae99354cf0d001abe Fiware-Correlator: 07a3c7f8-6027-11e8-b10f-000c29173617 Date: Fri, 25 May 2018 14:22:18 GMT 03. Dump & reset accumulator shows the bug: dateModified and dateCreated are not included ========================================================================================= POST http://localhost:9997/notify Fiware-Servicepath: / Content-Length: 125 User-Agent: orion/1.13.0-next libcurl/7.38.0 Ngsiv2-Attrsformat: normalized Host: localhost:9997 Accept: application/json Content-Type: application/json; charset=utf-8 Fiware-Correlator: 07a3c7f8-6027-11e8-b10f-000c29173617 { "data": [ { "A": { "metadata": {}, "type": "Text", "value": "foo" }, "id": "E1", "type": "T" } ], "subscriptionId": "5b081c1ae99354cf0d001abe" } ======================================= 04. But we can check that they are there, with a GET /v2/entities/E1/attrs?attrs=dateCreated,dateModified,* request =================================================================================================================== HTTP/1.1 200 OK Content-Length: 214 Content-Type: application/json Fiware-Correlator: 07adaf66-6027-11e8-b897-000c29173617 Date: Fri, 25 May 2018 14:22:18 GMT { "A": { "metadata": {}, "type": "Text", "value": "foo" }, "dateCreated": { "metadata": {}, "type": "DateTime", "value": "2018-05-25T14:22:18.00Z" }, "dateModified": { "metadata": {}, "type": "DateTime", "value": "2018-05-25T14:22:18.00Z" } } 04. ... and also in regular notifications (update entity and dump accumulator) ============================================================================== HTTP/1.1 204 No Content Content-Length: 0 Fiware-Correlator: 07b3a52e-6027-11e8-8ae2-000c29173617 Date: Fri, 25 May 2018 14:22:18 GMT POST http://localhost:9997/notify Fiware-Servicepath: / Content-Length: 290 User-Agent: orion/1.13.0-next libcurl/7.38.0 Ngsiv2-Attrsformat: normalized Host: localhost:9997 Accept: application/json Content-Type: application/json; charset=utf-8 Fiware-Correlator: 07b3a52e-6027-11e8-8ae2-000c29173617 { "data": [ { "A": { "metadata": {}, "type": "Text", "value": "bar" }, "dateCreated": { "metadata": {}, "type": "DateTime", "value": "2018-05-25T14:22:18.00Z" }, "dateModified": { "metadata": {}, "type": "DateTime", "value": "2018-05-25T14:22:18.00Z" }, "id": "E1", "type": "T" } ], "subscriptionId": "5b081c1ae99354cf0d001abe" } =======================================
The text was updated successfully, but these errors were encountered:
ADD test case for #3182 (already solved in a previous PR)
32dadeb
Fixed in PR #3301, .test and CNR added in PR #3315
Sorry, something went wrong.
Merge pull request #3315 from telefonicaid/hardening/3182_builtin_dat…
a6b218f
…es_in_initial_notif Functional test for #3182 issue
No branches or pull requests
Not a very important bug (as initial notifications are not very important)... but a bug after all :)
This is the .test script that raises the problem:
The output of the .test in something like this:
The text was updated successfully, but these errors were encountered: