{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/comments/26709381","id":26709381,"diff_hunk":"@@ -0,0 +1,106 @@\n+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.\n+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n+\n+#pragma once\n+\n+#include \"stdafx.h\"\n+#include <string>\n+#include \"cpprest\\details\\basic_types.h\"\n+#include \"cpprest\\json.h\" \n+#include \"connection.h\"\n+#include \"hub_connection.h\"\n+#include \"url.h\"\n+\n+TEST(connection_tests, connection_status_start_stop)\n+{\n+    auto conn = std::make_shared<signalr::connection>(url + U(\"raw-connection\"));\n+    auto test_event = std::make_shared<pplx::event>();","path":"test/signalrclient-e2e-tests/connection_tests.cpp","position":17,"original_position":17,"commit_id":"95b2cc6d91c8e4c5d0bad965066b522e29d34322","original_commit_id":"95b2cc6d91c8e4c5d0bad965066b522e29d34322","user":{"login":"moozzyk","id":1438884,"avatar_url":"https://avatars.githubusercontent.com/u/1438884?v=3","gravatar_id":"","url":"https://api.github.com/users/moozzyk","html_url":"https://github.com/moozzyk","followers_url":"https://api.github.com/users/moozzyk/followers","following_url":"https://api.github.com/users/moozzyk/following{/other_user}","gists_url":"https://api.github.com/users/moozzyk/gists{/gist_id}","starred_url":"https://api.github.com/users/moozzyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moozzyk/subscriptions","organizations_url":"https://api.github.com/users/moozzyk/orgs","repos_url":"https://api.github.com/users/moozzyk/repos","events_url":"https://api.github.com/users/moozzyk/events{/privacy}","received_events_url":"https://api.github.com/users/moozzyk/received_events","type":"User","site_admin":false},"body":"I know that gtest does not support timeout. I am saying that this event here is useless because you are running the code synchronously. So `ASSERT_FALSE(test_event->wait(15000));` can only fail if you have an exception and you won't signal the event. However if you have an exception then the test will be terminated because of `ASSERT_TRUE(false);` in the handler. As I pointed below - even if you didn't have the `try...catch` (which I think you should actually get rid of) `gtest` will catch the exception and handle it and you would never get to the last line. The event is just not needed here.","created_at":"2015-03-18T21:25:12Z","updated_at":"2015-03-18T21:25:12Z","html_url":"https://github.com/aspnet/SignalR-Client-Cpp/pull/109#discussion_r26709381","pull_request_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/comments/26709381"},"html":{"href":"https://github.com/aspnet/SignalR-Client-Cpp/pull/109#discussion_r26709381"},"pull_request":{"href":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/109","id":30990076,"html_url":"https://github.com/aspnet/SignalR-Client-Cpp/pull/109","diff_url":"https://github.com/aspnet/SignalR-Client-Cpp/pull/109.diff","patch_url":"https://github.com/aspnet/SignalR-Client-Cpp/pull/109.patch","issue_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/issues/109","number":109,"state":"open","locked":false,"title":"add c++ end-to-end tests","user":{"login":"Xiaohongt","id":2381199,"avatar_url":"https://avatars.githubusercontent.com/u/2381199?v=3","gravatar_id":"","url":"https://api.github.com/users/Xiaohongt","html_url":"https://github.com/Xiaohongt","followers_url":"https://api.github.com/users/Xiaohongt/followers","following_url":"https://api.github.com/users/Xiaohongt/following{/other_user}","gists_url":"https://api.github.com/users/Xiaohongt/gists{/gist_id}","starred_url":"https://api.github.com/users/Xiaohongt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xiaohongt/subscriptions","organizations_url":"https://api.github.com/users/Xiaohongt/orgs","repos_url":"https://api.github.com/users/Xiaohongt/repos","events_url":"https://api.github.com/users/Xiaohongt/events{/privacy}","received_events_url":"https://api.github.com/users/Xiaohongt/received_events","type":"User","site_admin":false},"body":"Added e2e tests for below scenarios: \r\nsend message, send message after connection re-start, send message after reconnect \r\n\r\nSupport ulr can be specified in commandline parameter as well, like:\r\nsignalrclient-e2e-tests.exe url=http://server1:8081/\r\n\r\nI will have separate PR for hub method parameter tests etc.\r\n\r\nNow the host is moved to test, not in sample.","created_at":"2015-03-11T22:04:25Z","updated_at":"2015-03-18T21:25:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bae92793dc02d29bd292d37ef69096ead4bca84c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/109/commits","review_comments_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/109/comments","review_comment_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/issues/109/comments","statuses_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/statuses/95b2cc6d91c8e4c5d0bad965066b522e29d34322","head":{"label":"aspnet:xiaota/e2e","ref":"xiaota/e2e","sha":"95b2cc6d91c8e4c5d0bad965066b522e29d34322","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":24436973,"name":"SignalR-Client-Cpp","full_name":"aspnet/SignalR-Client-Cpp","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/SignalR-Client-Cpp","description":"C++ client for SignalR.","fork":false,"url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp","forks_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/forks","keys_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/teams","hooks_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/hooks","issue_events_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/events","assignees_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/tags","blobs_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/languages","stargazers_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/stargazers","contributors_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/contributors","subscribers_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/subscribers","subscription_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/subscription","commits_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/merges","archive_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/downloads","issues_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/releases{/id}","created_at":"2014-09-25T00:02:40Z","updated_at":"2015-03-17T20:49:28Z","pushed_at":"2015-03-18T20:43:30Z","git_url":"git://github.com/aspnet/SignalR-Client-Cpp.git","ssh_url":"git@github.com:aspnet/SignalR-Client-Cpp.git","clone_url":"https://github.com/aspnet/SignalR-Client-Cpp.git","svn_url":"https://github.com/aspnet/SignalR-Client-Cpp","homepage":"","size":3444,"stargazers_count":24,"watchers_count":24,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":10,"forks":7,"open_issues":10,"watchers":24,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"701f39fabff4566ecffba7b671f88a2d8c1bd169","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":24436973,"name":"SignalR-Client-Cpp","full_name":"aspnet/SignalR-Client-Cpp","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/SignalR-Client-Cpp","description":"C++ client for SignalR.","fork":false,"url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp","forks_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/forks","keys_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/teams","hooks_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/hooks","issue_events_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/events","assignees_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/tags","blobs_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/languages","stargazers_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/stargazers","contributors_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/contributors","subscribers_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/subscribers","subscription_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/subscription","commits_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/merges","archive_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/downloads","issues_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/releases{/id}","created_at":"2014-09-25T00:02:40Z","updated_at":"2015-03-17T20:49:28Z","pushed_at":"2015-03-18T20:43:30Z","git_url":"git://github.com/aspnet/SignalR-Client-Cpp.git","ssh_url":"git@github.com:aspnet/SignalR-Client-Cpp.git","clone_url":"https://github.com/aspnet/SignalR-Client-Cpp.git","svn_url":"https://github.com/aspnet/SignalR-Client-Cpp","homepage":"","size":3444,"stargazers_count":24,"watchers_count":24,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":10,"forks":7,"open_issues":10,"watchers":24,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/109"},"html":{"href":"https://github.com/aspnet/SignalR-Client-Cpp/pull/109"},"issue":{"href":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/issues/109"},"comments":{"href":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/SignalR-Client-Cpp/statuses/95b2cc6d91c8e4c5d0bad965066b522e29d34322"}}}}