GitHub PullRequestReviewCommentEvent at 2014-09-08 07:25:55
Repository: fiware-orion
Actor: fgalan
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/17224775","id":17224775,"diff_hunk":"@@ -0,0 +1,429 @@\n+# Copyright 2014 Telefonica Investigacion y Desarrollo, S.A.U","path":"test/functionalTest/cases/query_redirect_operation.test","position":1,"original_position":1,"commit_id":"24352fc5f3438463f90b634b19a54685a499655b","original_commit_id":"24352fc5f3438463f90b634b19a54685a499655b","user":{"login":"fgalan","id":1534240,"avatar_url":"https://avatars.githubusercontent.com/u/1534240?v=2","gravatar_id":"1936b0d16210811a2aa8de96295f0693","url":"https://api.github.com/users/fgalan","html_url":"https://github.com/fgalan","followers_url":"https://api.github.com/users/fgalan/followers","following_url":"https://api.github.com/users/fgalan/following{/other_user}","gists_url":"https://api.github.com/users/fgalan/gists{/gist_id}","starred_url":"https://api.github.com/users/fgalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgalan/subscriptions","organizations_url":"https://api.github.com/users/fgalan/orgs","repos_url":"https://api.github.com/users/fgalan/repos","events_url":"https://api.github.com/users/fgalan/events{/privacy}","received_events_url":"https://api.github.com/users/fgalan/received_events","type":"User","site_admin":false},"body":"We should include also tests for convenience operations (probably in a differente .test). Moreover, it seems that some conv ops are not working, based on the following (manual) test, based on the examples from the manual.\r\n\r\nPreparation:\r\n\r\n* Start two CBs, one in 1026 and other in 1027, using different DBs.\r\n* Create an entity on 1027 with the following:\r\n\r\n```\r\n(curl localhost:1027/NGSI10/updateContext -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF\r\n{\r\n    \"contextElements\": [\r\n        {\r\n            \"type\": \"Room\",\r\n            \"isPattern\": \"false\",\r\n            \"id\": \"Room1\",\r\n            \"attributes\": [\r\n            {\r\n                \"name\": \"temperature\",\r\n                \"type\": \"centigrade\",\r\n                \"value\": \"23\"\r\n            },\r\n            {\r\n                \"name\": \"pressure\",\r\n                \"type\": \"mmHg\",\r\n                \"value\": \"720\"\r\n            }\r\n            ]\r\n        }\r\n    ],\r\n    \"updateAction\": \"APPEND\"\r\n}\r\nEOF\r\n```\r\n\r\n* Register the entity in 1026 with the following:\r\n\r\n```\r\n(curl localhost:1026/NGSI9/registerContext -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF\r\n{\r\n    \"contextRegistrations\": [\r\n        {\r\n            \"entities\": [\r\n                {\r\n                    \"type\": \"Room\",\r\n                    \"isPattern\": \"false\",\r\n                    \"id\": \"Room1\"\r\n                }\r\n           ],\r\n            \"attributes\": [\r\n                {\r\n                    \"name\": \"temperature\",\r\n                    \"type\": \"centigrade\",\r\n                    \"isDomain\": \"false\"\r\n                },\r\n                {\r\n                    \"name\": \"pressure\",\r\n                    \"type\": \"mmHg\",\r\n                    \"isDomain\": \"false\"\r\n                }\r\n            ],\r\n            \"providingApplication\": \"http://localhost:1027/ngsi10\"\r\n        }\r\n    ],\r\n    \"duration\": \"P1M\"\r\n}\r\nEOF\r\n```\r\n\r\n* Now, if you query on 1026 using standard operation, it works.\r\n\r\n```\r\n(curl localhost:1026/NGSI10/queryContext -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF\r\n{\r\n    \"entities\": [\r\n    {\r\n        \"type\": \"Room\",\r\n        \"isPattern\": \"true\",\r\n        \"id\": \"Room.*\"\r\n    }\r\n    ],\r\n    \"attributes\" : [\r\n    ]\r\n}\r\nEOF\r\n\r\n{\r\n    \"contextResponses\": [\r\n        {\r\n            \"contextElement\": {\r\n                \"attributes\": [\r\n                    {\r\n                        \"name\": \"temperature\",\r\n                        \"type\": \"centigrade\",\r\n                        \"value\": \"23\"\r\n                    },\r\n                    {\r\n                        \"name\": \"pressure\",\r\n                        \"type\": \"mmHg\",\r\n                        \"value\": \"720\"\r\n                    }\r\n                ],\r\n                \"id\": \"Room1\",\r\n                \"isPattern\": \"false\",\r\n                \"type\": \"Room\"\r\n            },\r\n            \"statusCode\": {\r\n                \"code\": \"200\",\r\n                \"details\": \"Redirected to context provider localhost:1027/ngsi10\",\r\n                \"reasonPhrase\": \"OK\"\r\n            }\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\n* But, if you query on 1026 using con op, it doesn't work.\r\n\r\n```\r\ncurl localhost:1026/ngsi10/contextEntities/Room1 -s -S --header 'Accept: application/json' | python -mjson.tool                                      {\r\n    \"contextElement\": {\r\n        \"id\": \"Room1\",\r\n        \"isPattern\": \"false\",\r\n        \"type\": \"\"\r\n    },\r\n    \"statusCode\": {\r\n        \"code\": \"404\",\r\n        \"details\": \"Entity id: 'Room1'\",\r\n        \"reasonPhrase\": \"No context element found\"\r\n    }\r\n}\r\n```\r\n\r\n(Not sure if the problem is in the code or in the way I'm doing the test :)","created_at":"2014-09-08T07:25:55Z","updated_at":"2014-09-08T07:25:55Z","html_url":"https://github.com/telefonicaid/fiware-orion/pull/515#discussion_r17224775","pull_request_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/515","_links":{"self":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/17224775"},"html":{"href":"https://github.com/telefonicaid/fiware-orion/pull/515#discussion_r17224775"},"pull_request":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/515"}}},"pull_request":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/515","id":20039715,"html_url":"https://github.com/telefonicaid/fiware-orion/pull/515","diff_url":"https://github.com/telefonicaid/fiware-orion/pull/515.diff","patch_url":"https://github.com/telefonicaid/fiware-orion/pull/515.patch","issue_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/515","number":515,"state":"open","locked":false,"title":"Task/499 network part of issue","user":{"login":"kzangeli","id":5338380,"avatar_url":"https://avatars.githubusercontent.com/u/5338380?v=2","gravatar_id":"219ceb8e935c4c592687383e471b6310","url":"https://api.github.com/users/kzangeli","html_url":"https://github.com/kzangeli","followers_url":"https://api.github.com/users/kzangeli/followers","following_url":"https://api.github.com/users/kzangeli/following{/other_user}","gists_url":"https://api.github.com/users/kzangeli/gists{/gist_id}","starred_url":"https://api.github.com/users/kzangeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzangeli/subscriptions","organizations_url":"https://api.github.com/users/kzangeli/orgs","repos_url":"https://api.github.com/users/kzangeli/repos","events_url":"https://api.github.com/users/kzangeli/events{/privacy}","received_events_url":"https://api.github.com/users/kzangeli/received_events","type":"User","site_admin":false},"body":"### Description\r\no Fixed the 'network part' of issue #499 (part 1 of uncached queries/updates for context providers).\r\n\r\no About adding CB_PORT as preferred variable to BROKER_PORT, doing the FULL change, i.e. completely stop using BROKER_PORT etc is a too big task to include in this PR. I tried but it got BIG. Coming in a PR soon.\r\n\r\no About statistics, I have passed completely on the statistics in this PR. There are two new messages 'QueryContextResponse' and 'UpdateContextResponse' but they are NOT included in the statistics. Perhaps this was not a good idea, and it is easy enough to include them. However, I have a feeling the entire statistics concept needs to be looked over ...\r\n\r\no I had some problems with the compiler copying entire vectors, in the clone/fill functions. I changed a few of them from 'const Class&' to 'Class*'. Also, I changed the name 'clone' to 'fill' for the methods that don't actually clone anything (methods that just fill).\r\n","created_at":"2014-08-20T11:42:05Z","updated_at":"2014-09-08T07:25:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"574727077871f401eeb909c71ce3d0315ddf9aad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/515/commits","review_comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/515/comments","review_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/{number}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/515/comments","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/24352fc5f3438463f90b634b19a54685a499655b","head":{"label":"telefonicaid:task/499_network_part_of_issue","ref":"task/499_network_part_of_issue","sha":"24352fc5f3438463f90b634b19a54685a499655b","user":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=2","gravatar_id":"05c84be2ce3d0a014ac4253156a1eaff","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"repo":{"id":12808420,"name":"fiware-orion","full_name":"telefonicaid/fiware-orion","owner":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=2","gravatar_id":"05c84be2ce3d0a014ac4253156a1eaff","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/telefonicaid/fiware-orion","description":"FI-WARE Orion Context Broker","fork":false,"url":"https://api.github.com/repos/telefonicaid/fiware-orion","forks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/forks","keys_url":"https://api.github.com/repos/telefonicaid/fiware-orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/telefonicaid/fiware-orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/telefonicaid/fiware-orion/teams","hooks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/hooks","issue_events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/events{/number}","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/events","assignees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/assignees{/user}","branches_url":"https://api.github.com/repos/telefonicaid/fiware-orion/branches{/branch}","tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/tags","blobs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/{sha}","languages_url":"https://api.github.com/repos/telefonicaid/fiware-orion/languages","stargazers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/stargazers","contributors_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contributors","subscribers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscribers","subscription_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscription","commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/comments/{number}","contents_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contents/{+path}","compare_url":"https://api.github.com/repos/telefonicaid/fiware-orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/telefonicaid/fiware-orion/merges","archive_url":"https://api.github.com/repos/telefonicaid/fiware-orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/telefonicaid/fiware-orion/downloads","issues_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues{/number}","pulls_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls{/number}","milestones_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones{/number}","notifications_url":"https://api.github.com/repos/telefonicaid/fiware-orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels{/name}","releases_url":"https://api.github.com/repos/telefonicaid/fiware-orion/releases{/id}","created_at":"2013-09-13T11:55:25Z","updated_at":"2014-08-27T10:51:36Z","pushed_at":"2014-09-07T19:57:22Z","git_url":"git://github.com/telefonicaid/fiware-orion.git","ssh_url":"git@github.com:telefonicaid/fiware-orion.git","clone_url":"https://github.com/telefonicaid/fiware-orion.git","svn_url":"https://github.com/telefonicaid/fiware-orion","homepage":"http://catalogue.fi-ware.eu/enablers/publishsubscribe-context-broker-orion-context-broker","size":15947,"stargazers_count":8,"watchers_count":8,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":8,"mirror_url":null,"open_issues_count":78,"forks":8,"open_issues":78,"watchers":8,"default_branch":"develop"}},"base":{"label":"telefonicaid:feature/499_basic_ctx_providers","ref":"feature/499_basic_ctx_providers","sha":"0f4ece6fbfe7e8f3965abdd173a17e62a3bb7590","user":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=2","gravatar_id":"05c84be2ce3d0a014ac4253156a1eaff","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"repo":{"id":12808420,"name":"fiware-orion","full_name":"telefonicaid/fiware-orion","owner":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=2","gravatar_id":"05c84be2ce3d0a014ac4253156a1eaff","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/telefonicaid/fiware-orion","description":"FI-WARE Orion Context Broker","fork":false,"url":"https://api.github.com/repos/telefonicaid/fiware-orion","forks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/forks","keys_url":"https://api.github.com/repos/telefonicaid/fiware-orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/telefonicaid/fiware-orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/telefonicaid/fiware-orion/teams","hooks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/hooks","issue_events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/events{/number}","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/events","assignees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/assignees{/user}","branches_url":"https://api.github.com/repos/telefonicaid/fiware-orion/branches{/branch}","tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/tags","blobs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/{sha}","languages_url":"https://api.github.com/repos/telefonicaid/fiware-orion/languages","stargazers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/stargazers","contributors_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contributors","subscribers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscribers","subscription_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscription","commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/comments/{number}","contents_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contents/{+path}","compare_url":"https://api.github.com/repos/telefonicaid/fiware-orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/telefonicaid/fiware-orion/merges","archive_url":"https://api.github.com/repos/telefonicaid/fiware-orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/telefonicaid/fiware-orion/downloads","issues_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues{/number}","pulls_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls{/number}","milestones_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones{/number}","notifications_url":"https://api.github.com/repos/telefonicaid/fiware-orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels{/name}","releases_url":"https://api.github.com/repos/telefonicaid/fiware-orion/releases{/id}","created_at":"2013-09-13T11:55:25Z","updated_at":"2014-08-27T10:51:36Z","pushed_at":"2014-09-07T19:57:22Z","git_url":"git://github.com/telefonicaid/fiware-orion.git","ssh_url":"git@github.com:telefonicaid/fiware-orion.git","clone_url":"https://github.com/telefonicaid/fiware-orion.git","svn_url":"https://github.com/telefonicaid/fiware-orion","homepage":"http://catalogue.fi-ware.eu/enablers/publishsubscribe-context-broker-orion-context-broker","size":15947,"stargazers_count":8,"watchers_count":8,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":8,"mirror_url":null,"open_issues_count":78,"forks":8,"open_issues":78,"watchers":8,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/515"},"html":{"href":"https://github.com/telefonicaid/fiware-orion/pull/515"},"issue":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/515"},"comments":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/515/comments"},"review_comments":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/515/comments"},"review_comment":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/515/commits"},"statuses":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/24352fc5f3438463f90b634b19a54685a499655b"}}}}