{"action":"created","comment":{"url":"https://api.github.com/repos/square/p2/pulls/comments/57247462","id":57247462,"diff_hunk":"@@ -683,8 +684,88 @@ func TestShouldRollMidwayHealthyMigrationFromZeroWhenNewSatisfies(t *testing.T)\n \tupd.DesiredReplicas = 3\n \tupd.MinimumReplicas = 2\n \n-\tremove, add, err := upd.shouldRollAfterDelay(rc_fields.RC{ID: upd.NewRC, Manifest: manifest})\n+\tremove, add, err := upd.shouldRollAfterDelay(manifest.ID())\n \tAssert(t).IsNil(err, \"expected no error determining nodes to roll\")\n \tAssert(t).AreEqual(remove, 0, \"expected to remove no nodes\")\n \tAssert(t).AreEqual(add, 1, \"expected to add one node\")\n }\n+\n+func panicOnError(desc string, errs <-chan error) {\n+\terr, ok := <-errs\n+\tif ok {\n+\t\tpanic(\"Error received on \" + desc + \":\" + err.Error())","path":"pkg/roll/update_test.go","position":132,"original_position":132,"commit_id":"bff853806bf8310e10758967de10ddf2965fc47d","original_commit_id":"bff853806bf8310e10758967de10ddf2965fc47d","user":{"login":"mpuncel","id":1444855,"avatar_url":"https://avatars.githubusercontent.com/u/1444855?v=3","gravatar_id":"","url":"https://api.github.com/users/mpuncel","html_url":"https://github.com/mpuncel","followers_url":"https://api.github.com/users/mpuncel/followers","following_url":"https://api.github.com/users/mpuncel/following{/other_user}","gists_url":"https://api.github.com/users/mpuncel/gists{/gist_id}","starred_url":"https://api.github.com/users/mpuncel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpuncel/subscriptions","organizations_url":"https://api.github.com/users/mpuncel/orgs","repos_url":"https://api.github.com/users/mpuncel/repos","events_url":"https://api.github.com/users/mpuncel/events{/privacy}","received_events_url":"https://api.github.com/users/mpuncel/received_events","type":"User","site_admin":false},"body":"does `t.Fatal` not work in a goroutine? probably would be nicer if so ","created_at":"2016-03-23T22:20:55Z","updated_at":"2016-03-23T22:20:55Z","html_url":"https://github.com/square/p2/pull/431#discussion_r57247462","pull_request_url":"https://api.github.com/repos/square/p2/pulls/431","_links":{"self":{"href":"https://api.github.com/repos/square/p2/pulls/comments/57247462"},"html":{"href":"https://github.com/square/p2/pull/431#discussion_r57247462"},"pull_request":{"href":"https://api.github.com/repos/square/p2/pulls/431"}}},"pull_request":{"url":"https://api.github.com/repos/square/p2/pulls/431","id":63960596,"html_url":"https://github.com/square/p2/pull/431","diff_url":"https://github.com/square/p2/pull/431.diff","patch_url":"https://github.com/square/p2/pull/431.patch","issue_url":"https://api.github.com/repos/square/p2/issues/431","number":431,"state":"open","locked":false,"title":"Extract roll loop into testable function, then test it","user":{"login":"petertseng","id":346181,"avatar_url":"https://avatars.githubusercontent.com/u/346181?v=3","gravatar_id":"","url":"https://api.github.com/users/petertseng","html_url":"https://github.com/petertseng","followers_url":"https://api.github.com/users/petertseng/followers","following_url":"https://api.github.com/users/petertseng/following{/other_user}","gists_url":"https://api.github.com/users/petertseng/gists{/gist_id}","starred_url":"https://api.github.com/users/petertseng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petertseng/subscriptions","organizations_url":"https://api.github.com/users/petertseng/orgs","repos_url":"https://api.github.com/users/petertseng/repos","events_url":"https://api.github.com/users/petertseng/events{/privacy}","received_events_url":"https://api.github.com/users/petertseng/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-23T22:04:05Z","updated_at":"2016-03-23T22:20:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d98463c41050dd6ff13ac118a8a8d07b13c6027","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/p2/pulls/431/commits","review_comments_url":"https://api.github.com/repos/square/p2/pulls/431/comments","review_comment_url":"https://api.github.com/repos/square/p2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/p2/issues/431/comments","statuses_url":"https://api.github.com/repos/square/p2/statuses/bff853806bf8310e10758967de10ddf2965fc47d","head":{"label":"petertseng:roll-test","ref":"roll-test","sha":"bff853806bf8310e10758967de10ddf2965fc47d","user":{"login":"petertseng","id":346181,"avatar_url":"https://avatars.githubusercontent.com/u/346181?v=3","gravatar_id":"","url":"https://api.github.com/users/petertseng","html_url":"https://github.com/petertseng","followers_url":"https://api.github.com/users/petertseng/followers","following_url":"https://api.github.com/users/petertseng/following{/other_user}","gists_url":"https://api.github.com/users/petertseng/gists{/gist_id}","starred_url":"https://api.github.com/users/petertseng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petertseng/subscriptions","organizations_url":"https://api.github.com/users/petertseng/orgs","repos_url":"https://api.github.com/users/petertseng/repos","events_url":"https://api.github.com/users/petertseng/events{/privacy}","received_events_url":"https://api.github.com/users/petertseng/received_events","type":"User","site_admin":false},"repo":{"id":38632684,"name":"p2","full_name":"petertseng/p2","owner":{"login":"petertseng","id":346181,"avatar_url":"https://avatars.githubusercontent.com/u/346181?v=3","gravatar_id":"","url":"https://api.github.com/users/petertseng","html_url":"https://github.com/petertseng","followers_url":"https://api.github.com/users/petertseng/followers","following_url":"https://api.github.com/users/petertseng/following{/other_user}","gists_url":"https://api.github.com/users/petertseng/gists{/gist_id}","starred_url":"https://api.github.com/users/petertseng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petertseng/subscriptions","organizations_url":"https://api.github.com/users/petertseng/orgs","repos_url":"https://api.github.com/users/petertseng/repos","events_url":"https://api.github.com/users/petertseng/events{/privacy}","received_events_url":"https://api.github.com/users/petertseng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petertseng/p2","description":"Platypus Platform: Tools for Scalable Deployment","fork":true,"url":"https://api.github.com/repos/petertseng/p2","forks_url":"https://api.github.com/repos/petertseng/p2/forks","keys_url":"https://api.github.com/repos/petertseng/p2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petertseng/p2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petertseng/p2/teams","hooks_url":"https://api.github.com/repos/petertseng/p2/hooks","issue_events_url":"https://api.github.com/repos/petertseng/p2/issues/events{/number}","events_url":"https://api.github.com/repos/petertseng/p2/events","assignees_url":"https://api.github.com/repos/petertseng/p2/assignees{/user}","branches_url":"https://api.github.com/repos/petertseng/p2/branches{/branch}","tags_url":"https://api.github.com/repos/petertseng/p2/tags","blobs_url":"https://api.github.com/repos/petertseng/p2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petertseng/p2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petertseng/p2/git/refs{/sha}","trees_url":"https://api.github.com/repos/petertseng/p2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petertseng/p2/statuses/{sha}","languages_url":"https://api.github.com/repos/petertseng/p2/languages","stargazers_url":"https://api.github.com/repos/petertseng/p2/stargazers","contributors_url":"https://api.github.com/repos/petertseng/p2/contributors","subscribers_url":"https://api.github.com/repos/petertseng/p2/subscribers","subscription_url":"https://api.github.com/repos/petertseng/p2/subscription","commits_url":"https://api.github.com/repos/petertseng/p2/commits{/sha}","git_commits_url":"https://api.github.com/repos/petertseng/p2/git/commits{/sha}","comments_url":"https://api.github.com/repos/petertseng/p2/comments{/number}","issue_comment_url":"https://api.github.com/repos/petertseng/p2/issues/comments{/number}","contents_url":"https://api.github.com/repos/petertseng/p2/contents/{+path}","compare_url":"https://api.github.com/repos/petertseng/p2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petertseng/p2/merges","archive_url":"https://api.github.com/repos/petertseng/p2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petertseng/p2/downloads","issues_url":"https://api.github.com/repos/petertseng/p2/issues{/number}","pulls_url":"https://api.github.com/repos/petertseng/p2/pulls{/number}","milestones_url":"https://api.github.com/repos/petertseng/p2/milestones{/number}","notifications_url":"https://api.github.com/repos/petertseng/p2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petertseng/p2/labels{/name}","releases_url":"https://api.github.com/repos/petertseng/p2/releases{/id}","deployments_url":"https://api.github.com/repos/petertseng/p2/deployments","created_at":"2015-07-06T16:51:15Z","updated_at":"2016-01-21T20:04:33Z","pushed_at":"2016-03-23T22:01:28Z","git_url":"git://github.com/petertseng/p2.git","ssh_url":"git@github.com:petertseng/p2.git","clone_url":"https://github.com/petertseng/p2.git","svn_url":"https://github.com/petertseng/p2","homepage":"","size":33037,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"square:master","ref":"master","sha":"f5fb9af666e2f0b23a5688f65fb8b2956922b209","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":25320424,"name":"p2","full_name":"square/p2","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/p2","description":"Platypus Platform: Tools for Scalable Deployment","fork":false,"url":"https://api.github.com/repos/square/p2","forks_url":"https://api.github.com/repos/square/p2/forks","keys_url":"https://api.github.com/repos/square/p2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/p2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/p2/teams","hooks_url":"https://api.github.com/repos/square/p2/hooks","issue_events_url":"https://api.github.com/repos/square/p2/issues/events{/number}","events_url":"https://api.github.com/repos/square/p2/events","assignees_url":"https://api.github.com/repos/square/p2/assignees{/user}","branches_url":"https://api.github.com/repos/square/p2/branches{/branch}","tags_url":"https://api.github.com/repos/square/p2/tags","blobs_url":"https://api.github.com/repos/square/p2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/p2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/p2/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/p2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/p2/statuses/{sha}","languages_url":"https://api.github.com/repos/square/p2/languages","stargazers_url":"https://api.github.com/repos/square/p2/stargazers","contributors_url":"https://api.github.com/repos/square/p2/contributors","subscribers_url":"https://api.github.com/repos/square/p2/subscribers","subscription_url":"https://api.github.com/repos/square/p2/subscription","commits_url":"https://api.github.com/repos/square/p2/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/p2/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/p2/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/p2/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/p2/contents/{+path}","compare_url":"https://api.github.com/repos/square/p2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/p2/merges","archive_url":"https://api.github.com/repos/square/p2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/p2/downloads","issues_url":"https://api.github.com/repos/square/p2/issues{/number}","pulls_url":"https://api.github.com/repos/square/p2/pulls{/number}","milestones_url":"https://api.github.com/repos/square/p2/milestones{/number}","notifications_url":"https://api.github.com/repos/square/p2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/p2/labels{/name}","releases_url":"https://api.github.com/repos/square/p2/releases{/id}","deployments_url":"https://api.github.com/repos/square/p2/deployments","created_at":"2014-10-16T20:31:12Z","updated_at":"2016-03-12T13:29:23Z","pushed_at":"2016-03-23T22:04:05Z","git_url":"git://github.com/square/p2.git","ssh_url":"git@github.com:square/p2.git","clone_url":"https://github.com/square/p2.git","svn_url":"https://github.com/square/p2","homepage":"","size":33249,"stargazers_count":101,"watchers_count":101,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":3,"forks":18,"open_issues":3,"watchers":101,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/p2/pulls/431"},"html":{"href":"https://github.com/square/p2/pull/431"},"issue":{"href":"https://api.github.com/repos/square/p2/issues/431"},"comments":{"href":"https://api.github.com/repos/square/p2/issues/431/comments"},"review_comments":{"href":"https://api.github.com/repos/square/p2/pulls/431/comments"},"review_comment":{"href":"https://api.github.com/repos/square/p2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/p2/pulls/431/commits"},"statuses":{"href":"https://api.github.com/repos/square/p2/statuses/bff853806bf8310e10758967de10ddf2965fc47d"}}}}