{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/comments/220635970","pull_request_review_id":159088934,"id":220635970,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDYzNTk3MA==","diff_hunk":"@@ -0,0 +1,156 @@\n+// Copyright (c) Microsoft. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n+\n+'use strict';\n+\n+var serviceSdk = require('azure-iothub');\n+var serviceSas = require('azure-iothub').SharedAccessSignature;\n+var provisioningServiceClient = require('azure-iot-provisioning-service').ProvisioningServiceClient;\n+var Message = require('azure-iot-common').Message;\n+var anHourFromNow = require('azure-iot-common').anHourFromNow;\n+var Registry = require('azure-iothub').Registry;\n+var NoRetry = require('azure-iot-common').NoRetry;\n+var deviceSdk = require('azure-iot-device');\n+\n+\n+var uuid = require('uuid');\n+\n+var hubConnectionString = process.env.IOTHUB_CONN_STRING_INVALIDCERT;\n+var deviceConnectionString = process.env.IOTHUB_DEVICE_CONN_STRING_INVALIDCERT;\n+var dpsDeviceClientEndpoint = process.env.DPS_GLOBALDEVICEENDPOINT_INVALIDCERT;\n+\n+\n+var correctDisconnectMessage = function(err, done) {\n+  if (err) {\n+    if (err.amqpError && (err.amqpError.name === 'NotConnectedError')) {\n+      done();\n+    } else if (err.name && (err.name  === 'NotConnectedError')) {\n+      done();\n+    } else if (err.code && (err.code === 'UNABLE_TO_VERIFY_LEAF_SIGNATURE')) {\n+      done();\n+    } else {\n+      done(new Error('client did NOT detect bad cert.'));\n+    }\n+  } else {\n+    done(new Error('client did NOT detect bad cert.'));\n+  }\n+};\n+\n+\n+describe('Service Client', function () {\n+  this.timeout(60000);\n+  [\n+    require('azure-iothub').Amqp,","path":"e2etests/test/server_valid.js","position":43,"original_position":43,"commit_id":"9e10bb94142516ef5db0f72b8299f084f19a2fe1","original_commit_id":"9e10bb94142516ef5db0f72b8299f084f19a2fe1","user":{"login":"anthonyvercolano","id":9854568,"node_id":"MDQ6VXNlcjk4NTQ1Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/9854568?v=4","gravatar_id":"","url":"https://api.github.com/users/anthonyvercolano","html_url":"https://github.com/anthonyvercolano","followers_url":"https://api.github.com/users/anthonyvercolano/followers","following_url":"https://api.github.com/users/anthonyvercolano/following{/other_user}","gists_url":"https://api.github.com/users/anthonyvercolano/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonyvercolano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonyvercolano/subscriptions","organizations_url":"https://api.github.com/users/anthonyvercolano/orgs","repos_url":"https://api.github.com/users/anthonyvercolano/repos","events_url":"https://api.github.com/users/anthonyvercolano/events{/privacy}","received_events_url":"https://api.github.com/users/anthonyvercolano/received_events","type":"User","site_admin":false},"body":"Because I find it irritating to simply create a variable that will ONLY be used to initialize this array.\r\n\r\n---\r\nIn reply to: [220400541](https://github.com/Azure/azure-iot-sdk-node/pull/378#discussion_r220400541) [](ancestors = 220400541)","created_at":"2018-09-26T16:31:40Z","updated_at":"2018-09-26T16:31:40Z","html_url":"https://github.com/Azure/azure-iot-sdk-node/pull/378#discussion_r220635970","pull_request_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/378","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/comments/220635970"},"html":{"href":"https://github.com/Azure/azure-iot-sdk-node/pull/378#discussion_r220635970"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/378"}},"in_reply_to_id":220400541},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/378","id":218097775,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4MDk3Nzc1","html_url":"https://github.com/Azure/azure-iot-sdk-node/pull/378","diff_url":"https://github.com/Azure/azure-iot-sdk-node/pull/378.diff","patch_url":"https://github.com/Azure/azure-iot-sdk-node/pull/378.patch","issue_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/378","number":378,"state":"open","locked":false,"title":"(fix:common/amqp) Add agnostic hub not found message and invalid serv…","user":{"login":"anthonyvercolano","id":9854568,"node_id":"MDQ6VXNlcjk4NTQ1Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/9854568?v=4","gravatar_id":"","url":"https://api.github.com/users/anthonyvercolano","html_url":"https://github.com/anthonyvercolano","followers_url":"https://api.github.com/users/anthonyvercolano/followers","following_url":"https://api.github.com/users/anthonyvercolano/following{/other_user}","gists_url":"https://api.github.com/users/anthonyvercolano/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonyvercolano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonyvercolano/subscriptions","organizations_url":"https://api.github.com/users/anthonyvercolano/orgs","repos_url":"https://api.github.com/users/anthonyvercolano/repos","events_url":"https://api.github.com/users/anthonyvercolano/events{/privacy}","received_events_url":"https://api.github.com/users/anthonyvercolano/received_events","type":"User","site_admin":false},"body":"…er tests and remove two disconnect tests.\r\n\r\nRemove the twin and method disconnect tests.\r\n\r\n","created_at":"2018-09-25T19:47:23Z","updated_at":"2018-09-26T16:31:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3052988788c8902c767891065850eb143560f2b3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/378/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/378/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/378/comments","statuses_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/statuses/9e10bb94142516ef5db0f72b8299f084f19a2fe1","head":{"label":"Azure:servercert-check","ref":"servercert-check","sha":"9e10bb94142516ef5db0f72b8299f084f19a2fe1","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":70935002,"node_id":"MDEwOlJlcG9zaXRvcnk3MDkzNTAwMg==","name":"azure-iot-sdk-node","full_name":"Azure/azure-iot-sdk-node","private":false,"owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Azure/azure-iot-sdk-node","description":"A Node.js SDK for connecting devices to Microsoft Azure IoT services","fork":false,"url":"https://api.github.com/repos/Azure/azure-iot-sdk-node","forks_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/forks","keys_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/teams","hooks_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/events","assignees_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/tags","blobs_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/subscription","commits_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/merges","archive_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/downloads","issues_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/deployments","created_at":"2016-10-14T18:03:43Z","updated_at":"2018-09-25T22:55:19Z","pushed_at":"2018-09-26T16:12:47Z","git_url":"git://github.com/Azure/azure-iot-sdk-node.git","ssh_url":"git@github.com:Azure/azure-iot-sdk-node.git","clone_url":"https://github.com/Azure/azure-iot-sdk-node.git","svn_url":"https://github.com/Azure/azure-iot-sdk-node","homepage":"https://docs.microsoft.com/en-us/azure/iot-hub/","size":44461,"stargazers_count":115,"watchers_count":115,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":98,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":98,"open_issues":13,"watchers":115,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"42a9e5cd1632a261e88948ed26c07e77a4efee5e","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":70935002,"node_id":"MDEwOlJlcG9zaXRvcnk3MDkzNTAwMg==","name":"azure-iot-sdk-node","full_name":"Azure/azure-iot-sdk-node","private":false,"owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Azure/azure-iot-sdk-node","description":"A Node.js SDK for connecting devices to Microsoft Azure IoT services","fork":false,"url":"https://api.github.com/repos/Azure/azure-iot-sdk-node","forks_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/forks","keys_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/teams","hooks_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/events","assignees_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/tags","blobs_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/subscription","commits_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/merges","archive_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/downloads","issues_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/deployments","created_at":"2016-10-14T18:03:43Z","updated_at":"2018-09-25T22:55:19Z","pushed_at":"2018-09-26T16:12:47Z","git_url":"git://github.com/Azure/azure-iot-sdk-node.git","ssh_url":"git@github.com:Azure/azure-iot-sdk-node.git","clone_url":"https://github.com/Azure/azure-iot-sdk-node.git","svn_url":"https://github.com/Azure/azure-iot-sdk-node","homepage":"https://docs.microsoft.com/en-us/azure/iot-hub/","size":44461,"stargazers_count":115,"watchers_count":115,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":98,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":98,"open_issues":13,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/378"},"html":{"href":"https://github.com/Azure/azure-iot-sdk-node/pull/378"},"issue":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/378"},"comments":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/378/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/378/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/378/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/statuses/9e10bb94142516ef5db0f72b8299f084f19a2fe1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"anthonyvercolano"}}