{"action":"created","comment":{"url":"https://api.github.com/repos/cheshir/go-mq/pulls/comments/132682136","pull_request_review_id":55791559,"id":132682136,"diff_hunk":"@@ -0,0 +1,433 @@\n+// +build !race\n+\n+// There is some issue with wabbit that causes a data races\n+// so we mute race detector until issue wont be fixed.\n+package mq\n+\n+import (\n+\t\"flag\"\n+\t\"sync/atomic\"\n+\t\"testing\"\n+\t\"time\"\n+\n+\t\"github.com/NeowayLabs/wabbit/amqptest/server\"\n+)\n+\n+const (\n+\tdsnForTests = \"amqp://guest:guest@localhost:5672/\"\n+\n+\tdefaultConsumerName = \"default_consumer\"\n+\tdefaultExchangeName = \"default_exchange\"\n+\tdefaultExchangeType = \"direct\"\n+\tdefaultQueueName    = \"default_queue\"\n+\tdefaultProducerName = \"default_producer\"\n+\tdefaultRoutingKey   = \"routing_key\"\n+)\n+\n+func init() {\n+\tflag.BoolVar(&brokerIsMocked, \"mock-broker\", true, \"Whether to mock broker or use real one. 0: use real broker. 1: use mocked broker.\")\n+}\n+\n+func TestMq_ConnectToStoppedBroker(t *testing.T) {\n+\tif !brokerIsMocked {\n+\t\tt.Skip(\"We can't stop real broker from test.\")\n+\t}\n+\n+\t_, err := New(Config{\n+\t\tDSN: dsnForTests,\n+\t})\n+\n+\tif err == nil {\n+\t\tt.Error(\"Mq must not successfully connect to the broker when it's stopped.\")","path":"mq_test.go","position":41,"original_position":41,"commit_id":"7891d3b917b57c11f6967d11758870485f8202b5","original_commit_id":"9343f468d19d9b35632ece2a06dd6d9b93405014","user":{"login":"ynotLeft","id":7753483,"avatar_url":"https://avatars3.githubusercontent.com/u/7753483?v=4","gravatar_id":"","url":"https://api.github.com/users/ynotLeft","html_url":"https://github.com/ynotLeft","followers_url":"https://api.github.com/users/ynotLeft/followers","following_url":"https://api.github.com/users/ynotLeft/following{/other_user}","gists_url":"https://api.github.com/users/ynotLeft/gists{/gist_id}","starred_url":"https://api.github.com/users/ynotLeft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ynotLeft/subscriptions","organizations_url":"https://api.github.com/users/ynotLeft/orgs","repos_url":"https://api.github.com/users/ynotLeft/repos","events_url":"https://api.github.com/users/ynotLeft/events{/privacy}","received_events_url":"https://api.github.com/users/ynotLeft/received_events","type":"User","site_admin":false},"body":"Получилось Mq не должен успешно подключаться к брокеру когда тот остановился.\r\n\r\nможет написать: \r\nError occurred while trying to connect to the stopped broker?","created_at":"2017-08-11T13:13:58Z","updated_at":"2017-08-11T13:13:58Z","html_url":"https://github.com/cheshir/go-mq/pull/13#discussion_r132682136","pull_request_url":"https://api.github.com/repos/cheshir/go-mq/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/cheshir/go-mq/pulls/comments/132682136"},"html":{"href":"https://github.com/cheshir/go-mq/pull/13#discussion_r132682136"},"pull_request":{"href":"https://api.github.com/repos/cheshir/go-mq/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/cheshir/go-mq/pulls/13","id":135230479,"html_url":"https://github.com/cheshir/go-mq/pull/13","diff_url":"https://github.com/cheshir/go-mq/pull/13.diff","patch_url":"https://github.com/cheshir/go-mq/pull/13.patch","issue_url":"https://api.github.com/repos/cheshir/go-mq/issues/13","number":13,"state":"closed","locked":false,"title":"Added tests.","user":{"login":"cheshir","id":1440703,"avatar_url":"https://avatars3.githubusercontent.com/u/1440703?v=4","gravatar_id":"","url":"https://api.github.com/users/cheshir","html_url":"https://github.com/cheshir","followers_url":"https://api.github.com/users/cheshir/followers","following_url":"https://api.github.com/users/cheshir/following{/other_user}","gists_url":"https://api.github.com/users/cheshir/gists{/gist_id}","starred_url":"https://api.github.com/users/cheshir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheshir/subscriptions","organizations_url":"https://api.github.com/users/cheshir/orgs","repos_url":"https://api.github.com/users/cheshir/repos","events_url":"https://api.github.com/users/cheshir/events{/privacy}","received_events_url":"https://api.github.com/users/cheshir/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-10T21:51:02Z","updated_at":"2017-08-11T13:13:58Z","closed_at":"2017-08-11T12:37:29Z","merged_at":"2017-08-11T12:37:29Z","merge_commit_sha":"de6be23f90115daf00bd18ffd73e8146887764f4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/cheshir/go-mq/pulls/13/commits","review_comments_url":"https://api.github.com/repos/cheshir/go-mq/pulls/13/comments","review_comment_url":"https://api.github.com/repos/cheshir/go-mq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cheshir/go-mq/issues/13/comments","statuses_url":"https://api.github.com/repos/cheshir/go-mq/statuses/7891d3b917b57c11f6967d11758870485f8202b5","head":{"label":"cheshir:add_tests","ref":"add_tests","sha":"7891d3b917b57c11f6967d11758870485f8202b5","user":{"login":"cheshir","id":1440703,"avatar_url":"https://avatars3.githubusercontent.com/u/1440703?v=4","gravatar_id":"","url":"https://api.github.com/users/cheshir","html_url":"https://github.com/cheshir","followers_url":"https://api.github.com/users/cheshir/followers","following_url":"https://api.github.com/users/cheshir/following{/other_user}","gists_url":"https://api.github.com/users/cheshir/gists{/gist_id}","starred_url":"https://api.github.com/users/cheshir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheshir/subscriptions","organizations_url":"https://api.github.com/users/cheshir/orgs","repos_url":"https://api.github.com/users/cheshir/repos","events_url":"https://api.github.com/users/cheshir/events{/privacy}","received_events_url":"https://api.github.com/users/cheshir/received_events","type":"User","site_admin":false},"repo":{"id":94796654,"name":"go-mq","full_name":"cheshir/go-mq","owner":{"login":"cheshir","id":1440703,"avatar_url":"https://avatars3.githubusercontent.com/u/1440703?v=4","gravatar_id":"","url":"https://api.github.com/users/cheshir","html_url":"https://github.com/cheshir","followers_url":"https://api.github.com/users/cheshir/followers","following_url":"https://api.github.com/users/cheshir/following{/other_user}","gists_url":"https://api.github.com/users/cheshir/gists{/gist_id}","starred_url":"https://api.github.com/users/cheshir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheshir/subscriptions","organizations_url":"https://api.github.com/users/cheshir/orgs","repos_url":"https://api.github.com/users/cheshir/repos","events_url":"https://api.github.com/users/cheshir/events{/privacy}","received_events_url":"https://api.github.com/users/cheshir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cheshir/go-mq","description":"Wrapper above AMQP. Declare queues, producers and consumers in declarative way. ","fork":false,"url":"https://api.github.com/repos/cheshir/go-mq","forks_url":"https://api.github.com/repos/cheshir/go-mq/forks","keys_url":"https://api.github.com/repos/cheshir/go-mq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cheshir/go-mq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cheshir/go-mq/teams","hooks_url":"https://api.github.com/repos/cheshir/go-mq/hooks","issue_events_url":"https://api.github.com/repos/cheshir/go-mq/issues/events{/number}","events_url":"https://api.github.com/repos/cheshir/go-mq/events","assignees_url":"https://api.github.com/repos/cheshir/go-mq/assignees{/user}","branches_url":"https://api.github.com/repos/cheshir/go-mq/branches{/branch}","tags_url":"https://api.github.com/repos/cheshir/go-mq/tags","blobs_url":"https://api.github.com/repos/cheshir/go-mq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cheshir/go-mq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cheshir/go-mq/git/refs{/sha}","trees_url":"https://api.github.com/repos/cheshir/go-mq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cheshir/go-mq/statuses/{sha}","languages_url":"https://api.github.com/repos/cheshir/go-mq/languages","stargazers_url":"https://api.github.com/repos/cheshir/go-mq/stargazers","contributors_url":"https://api.github.com/repos/cheshir/go-mq/contributors","subscribers_url":"https://api.github.com/repos/cheshir/go-mq/subscribers","subscription_url":"https://api.github.com/repos/cheshir/go-mq/subscription","commits_url":"https://api.github.com/repos/cheshir/go-mq/commits{/sha}","git_commits_url":"https://api.github.com/repos/cheshir/go-mq/git/commits{/sha}","comments_url":"https://api.github.com/repos/cheshir/go-mq/comments{/number}","issue_comment_url":"https://api.github.com/repos/cheshir/go-mq/issues/comments{/number}","contents_url":"https://api.github.com/repos/cheshir/go-mq/contents/{+path}","compare_url":"https://api.github.com/repos/cheshir/go-mq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cheshir/go-mq/merges","archive_url":"https://api.github.com/repos/cheshir/go-mq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cheshir/go-mq/downloads","issues_url":"https://api.github.com/repos/cheshir/go-mq/issues{/number}","pulls_url":"https://api.github.com/repos/cheshir/go-mq/pulls{/number}","milestones_url":"https://api.github.com/repos/cheshir/go-mq/milestones{/number}","notifications_url":"https://api.github.com/repos/cheshir/go-mq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cheshir/go-mq/labels{/name}","releases_url":"https://api.github.com/repos/cheshir/go-mq/releases{/id}","deployments_url":"https://api.github.com/repos/cheshir/go-mq/deployments","created_at":"2017-06-19T16:16:30Z","updated_at":"2017-07-13T15:25:39Z","pushed_at":"2017-08-11T12:37:34Z","git_url":"git://github.com/cheshir/go-mq.git","ssh_url":"git@github.com:cheshir/go-mq.git","clone_url":"https://github.com/cheshir/go-mq.git","svn_url":"https://github.com/cheshir/go-mq","homepage":null,"size":35,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"cheshir:master","ref":"master","sha":"490b064fa25741d3bb985056a393268343c301de","user":{"login":"cheshir","id":1440703,"avatar_url":"https://avatars3.githubusercontent.com/u/1440703?v=4","gravatar_id":"","url":"https://api.github.com/users/cheshir","html_url":"https://github.com/cheshir","followers_url":"https://api.github.com/users/cheshir/followers","following_url":"https://api.github.com/users/cheshir/following{/other_user}","gists_url":"https://api.github.com/users/cheshir/gists{/gist_id}","starred_url":"https://api.github.com/users/cheshir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheshir/subscriptions","organizations_url":"https://api.github.com/users/cheshir/orgs","repos_url":"https://api.github.com/users/cheshir/repos","events_url":"https://api.github.com/users/cheshir/events{/privacy}","received_events_url":"https://api.github.com/users/cheshir/received_events","type":"User","site_admin":false},"repo":{"id":94796654,"name":"go-mq","full_name":"cheshir/go-mq","owner":{"login":"cheshir","id":1440703,"avatar_url":"https://avatars3.githubusercontent.com/u/1440703?v=4","gravatar_id":"","url":"https://api.github.com/users/cheshir","html_url":"https://github.com/cheshir","followers_url":"https://api.github.com/users/cheshir/followers","following_url":"https://api.github.com/users/cheshir/following{/other_user}","gists_url":"https://api.github.com/users/cheshir/gists{/gist_id}","starred_url":"https://api.github.com/users/cheshir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheshir/subscriptions","organizations_url":"https://api.github.com/users/cheshir/orgs","repos_url":"https://api.github.com/users/cheshir/repos","events_url":"https://api.github.com/users/cheshir/events{/privacy}","received_events_url":"https://api.github.com/users/cheshir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cheshir/go-mq","description":"Wrapper above AMQP. Declare queues, producers and consumers in declarative way. ","fork":false,"url":"https://api.github.com/repos/cheshir/go-mq","forks_url":"https://api.github.com/repos/cheshir/go-mq/forks","keys_url":"https://api.github.com/repos/cheshir/go-mq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cheshir/go-mq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cheshir/go-mq/teams","hooks_url":"https://api.github.com/repos/cheshir/go-mq/hooks","issue_events_url":"https://api.github.com/repos/cheshir/go-mq/issues/events{/number}","events_url":"https://api.github.com/repos/cheshir/go-mq/events","assignees_url":"https://api.github.com/repos/cheshir/go-mq/assignees{/user}","branches_url":"https://api.github.com/repos/cheshir/go-mq/branches{/branch}","tags_url":"https://api.github.com/repos/cheshir/go-mq/tags","blobs_url":"https://api.github.com/repos/cheshir/go-mq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cheshir/go-mq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cheshir/go-mq/git/refs{/sha}","trees_url":"https://api.github.com/repos/cheshir/go-mq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cheshir/go-mq/statuses/{sha}","languages_url":"https://api.github.com/repos/cheshir/go-mq/languages","stargazers_url":"https://api.github.com/repos/cheshir/go-mq/stargazers","contributors_url":"https://api.github.com/repos/cheshir/go-mq/contributors","subscribers_url":"https://api.github.com/repos/cheshir/go-mq/subscribers","subscription_url":"https://api.github.com/repos/cheshir/go-mq/subscription","commits_url":"https://api.github.com/repos/cheshir/go-mq/commits{/sha}","git_commits_url":"https://api.github.com/repos/cheshir/go-mq/git/commits{/sha}","comments_url":"https://api.github.com/repos/cheshir/go-mq/comments{/number}","issue_comment_url":"https://api.github.com/repos/cheshir/go-mq/issues/comments{/number}","contents_url":"https://api.github.com/repos/cheshir/go-mq/contents/{+path}","compare_url":"https://api.github.com/repos/cheshir/go-mq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cheshir/go-mq/merges","archive_url":"https://api.github.com/repos/cheshir/go-mq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cheshir/go-mq/downloads","issues_url":"https://api.github.com/repos/cheshir/go-mq/issues{/number}","pulls_url":"https://api.github.com/repos/cheshir/go-mq/pulls{/number}","milestones_url":"https://api.github.com/repos/cheshir/go-mq/milestones{/number}","notifications_url":"https://api.github.com/repos/cheshir/go-mq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cheshir/go-mq/labels{/name}","releases_url":"https://api.github.com/repos/cheshir/go-mq/releases{/id}","deployments_url":"https://api.github.com/repos/cheshir/go-mq/deployments","created_at":"2017-06-19T16:16:30Z","updated_at":"2017-07-13T15:25:39Z","pushed_at":"2017-08-11T12:37:34Z","git_url":"git://github.com/cheshir/go-mq.git","ssh_url":"git@github.com:cheshir/go-mq.git","clone_url":"https://github.com/cheshir/go-mq.git","svn_url":"https://github.com/cheshir/go-mq","homepage":null,"size":35,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cheshir/go-mq/pulls/13"},"html":{"href":"https://github.com/cheshir/go-mq/pull/13"},"issue":{"href":"https://api.github.com/repos/cheshir/go-mq/issues/13"},"comments":{"href":"https://api.github.com/repos/cheshir/go-mq/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/cheshir/go-mq/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/cheshir/go-mq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cheshir/go-mq/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/cheshir/go-mq/statuses/7891d3b917b57c11f6967d11758870485f8202b5"}}}}
{"actor":{"display_login":"ynotLeft"}}