{"action":"created","comment":{"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/comments/84268100","pull_request_review_id":5055312,"id":84268100,"diff_hunk":"@@ -102,4 +102,32 @@\n         .to raise_error(Common::Client::Errors::ClientResponse, 'Prescription is not Refillable')\n     end\n   end\n+\n+  context 'integration test for breakers' do\n+    it 'is raises a breakers exception after 50% failure rate' do\n+      now = Time.current\n+      start_time = now - 120\n+      Timecop.freeze(start_time)\n+\n+      stub_varx_request(:get, 'mhv-api/patient/v1/prescription/getactiverx', active_rxs, status_code: 200)\n+      20.times do\n+        client.get_active_rxs\n+      end\n+\n+      stub_varx_request(:get, 'mhv-api/patient/v1/prescription/getactiverx', active_rxs, status_code: 500)\n+      20.times do\n+        begin\n+          client.get_active_rxs\n+        rescue Common::Client::Errors::ClientResponse\n+          nil\n+        end\n+      end\n+\n+      expect { client.get_active_rxs }.to raise_exception(Breakers::OutageException)","path":"spec/lib/rx/api/prescriptions_spec.rb","position":25,"original_position":25,"commit_id":"e42b4af77dc297f4cd81baddb49836331996a508","original_commit_id":"e42b4af77dc297f4cd81baddb49836331996a508","user":{"login":"aub","id":2895,"avatar_url":"https://avatars.githubusercontent.com/u/2895?v=3","gravatar_id":"","url":"https://api.github.com/users/aub","html_url":"https://github.com/aub","followers_url":"https://api.github.com/users/aub/followers","following_url":"https://api.github.com/users/aub/following{/other_user}","gists_url":"https://api.github.com/users/aub/gists{/gist_id}","starred_url":"https://api.github.com/users/aub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aub/subscriptions","organizations_url":"https://api.github.com/users/aub/orgs","repos_url":"https://api.github.com/users/aub/repos","events_url":"https://api.github.com/users/aub/events{/privacy}","received_events_url":"https://api.github.com/users/aub/received_events","type":"User","site_admin":false},"body":"@saneshark You make a fine point. I will rewrite this as a true integration test that goes through the controller and make sure the error handling is done correctly.","created_at":"2016-10-20T12:10:52Z","updated_at":"2016-10-20T12:10:52Z","html_url":"https://github.com/department-of-veterans-affairs/vets-api/pull/304#discussion_r84268100","pull_request_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/304","_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/comments/84268100"},"html":{"href":"https://github.com/department-of-veterans-affairs/vets-api/pull/304#discussion_r84268100"},"pull_request":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/304"}}},"pull_request":{"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/304","id":90088467,"html_url":"https://github.com/department-of-veterans-affairs/vets-api/pull/304","diff_url":"https://github.com/department-of-veterans-affairs/vets-api/pull/304.diff","patch_url":"https://github.com/department-of-veterans-affairs/vets-api/pull/304.patch","issue_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/304","number":304,"state":"open","locked":false,"title":"add an integration spec for breakers","user":{"login":"aub","id":2895,"avatar_url":"https://avatars.githubusercontent.com/u/2895?v=3","gravatar_id":"","url":"https://api.github.com/users/aub","html_url":"https://github.com/aub","followers_url":"https://api.github.com/users/aub/followers","following_url":"https://api.github.com/users/aub/following{/other_user}","gists_url":"https://api.github.com/users/aub/gists{/gist_id}","starred_url":"https://api.github.com/users/aub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aub/subscriptions","organizations_url":"https://api.github.com/users/aub/orgs","repos_url":"https://api.github.com/users/aub/repos","events_url":"https://api.github.com/users/aub/events{/privacy}","received_events_url":"https://api.github.com/users/aub/received_events","type":"User","site_admin":false},"body":"Add a spec that shows breakers turning on and off an outage in Rx.","created_at":"2016-10-19T20:53:52Z","updated_at":"2016-10-20T12:10:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5c9129fe2a8c949311f1741aeaadf6e6f9a4ff9b","assignee":{"login":"robbiethegeek","id":408668,"avatar_url":"https://avatars.githubusercontent.com/u/408668?v=3","gravatar_id":"","url":"https://api.github.com/users/robbiethegeek","html_url":"https://github.com/robbiethegeek","followers_url":"https://api.github.com/users/robbiethegeek/followers","following_url":"https://api.github.com/users/robbiethegeek/following{/other_user}","gists_url":"https://api.github.com/users/robbiethegeek/gists{/gist_id}","starred_url":"https://api.github.com/users/robbiethegeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbiethegeek/subscriptions","organizations_url":"https://api.github.com/users/robbiethegeek/orgs","repos_url":"https://api.github.com/users/robbiethegeek/repos","events_url":"https://api.github.com/users/robbiethegeek/events{/privacy}","received_events_url":"https://api.github.com/users/robbiethegeek/received_events","type":"User","site_admin":false},"assignees":[{"login":"robbiethegeek","id":408668,"avatar_url":"https://avatars.githubusercontent.com/u/408668?v=3","gravatar_id":"","url":"https://api.github.com/users/robbiethegeek","html_url":"https://github.com/robbiethegeek","followers_url":"https://api.github.com/users/robbiethegeek/followers","following_url":"https://api.github.com/users/robbiethegeek/following{/other_user}","gists_url":"https://api.github.com/users/robbiethegeek/gists{/gist_id}","starred_url":"https://api.github.com/users/robbiethegeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbiethegeek/subscriptions","organizations_url":"https://api.github.com/users/robbiethegeek/orgs","repos_url":"https://api.github.com/users/robbiethegeek/repos","events_url":"https://api.github.com/users/robbiethegeek/events{/privacy}","received_events_url":"https://api.github.com/users/robbiethegeek/received_events","type":"User","site_admin":false},{"login":"saneshark","id":591737,"avatar_url":"https://avatars.githubusercontent.com/u/591737?v=3","gravatar_id":"","url":"https://api.github.com/users/saneshark","html_url":"https://github.com/saneshark","followers_url":"https://api.github.com/users/saneshark/followers","following_url":"https://api.github.com/users/saneshark/following{/other_user}","gists_url":"https://api.github.com/users/saneshark/gists{/gist_id}","starred_url":"https://api.github.com/users/saneshark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saneshark/subscriptions","organizations_url":"https://api.github.com/users/saneshark/orgs","repos_url":"https://api.github.com/users/saneshark/repos","events_url":"https://api.github.com/users/saneshark/events{/privacy}","received_events_url":"https://api.github.com/users/saneshark/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/304/commits","review_comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/304/comments","review_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/304/comments","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/statuses/e42b4af77dc297f4cd81baddb49836331996a508","head":{"label":"department-of-veterans-affairs:breakers_integration","ref":"breakers_integration","sha":"e42b4af77dc297f4cd81baddb49836331996a508","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":62409417,"name":"vets-api","full_name":"department-of-veterans-affairs/vets-api","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/vets-api","description":"API for vets.gov","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/deployments","created_at":"2016-07-01T17:33:19Z","updated_at":"2016-10-03T04:59:16Z","pushed_at":"2016-10-19T23:36:03Z","git_url":"git://github.com/department-of-veterans-affairs/vets-api.git","ssh_url":"git@github.com:department-of-veterans-affairs/vets-api.git","clone_url":"https://github.com/department-of-veterans-affairs/vets-api.git","svn_url":"https://github.com/department-of-veterans-affairs/vets-api","homepage":null,"size":4721,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":41,"forks":1,"open_issues":41,"watchers":4,"default_branch":"master"}},"base":{"label":"department-of-veterans-affairs:master","ref":"master","sha":"f7ab46a0394f869cb636eba41e2eef851683b38f","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":62409417,"name":"vets-api","full_name":"department-of-veterans-affairs/vets-api","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/vets-api","description":"API for vets.gov","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/deployments","created_at":"2016-07-01T17:33:19Z","updated_at":"2016-10-03T04:59:16Z","pushed_at":"2016-10-19T23:36:03Z","git_url":"git://github.com/department-of-veterans-affairs/vets-api.git","ssh_url":"git@github.com:department-of-veterans-affairs/vets-api.git","clone_url":"https://github.com/department-of-veterans-affairs/vets-api.git","svn_url":"https://github.com/department-of-veterans-affairs/vets-api","homepage":null,"size":4721,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":41,"forks":1,"open_issues":41,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/304"},"html":{"href":"https://github.com/department-of-veterans-affairs/vets-api/pull/304"},"issue":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/304"},"comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/304/comments"},"review_comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/304/comments"},"review_comment":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/pulls/304/commits"},"statuses":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/statuses/e42b4af77dc297f4cd81baddb49836331996a508"}}}}
{"actor":{"display_login":"aub"}}