{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/30545926","id":30545926,"diff_hunk":"@@ -144,13 +145,20 @@ func validateGuestbookApp(c *client.Client, ns string) {\n \n // Returns whether received expected response from guestbook on time.\n func waitForGuestbookResponse(c *client.Client, cmd, arg, expectedResponse string, timeout time.Duration, ns string) bool {\n-\tfor start := time.Now(); time.Since(start) < timeout; time.Sleep(5 * time.Second) {\n+\tflag := 1\n+\texpectNoError(wait.Poll(5*time.Second, timeout, func() (bool, error) {\n \t\tres, err := makeRequestToGuestbook(c, cmd, arg, ns)\n \t\tif err == nil && res == expectedResponse {\n-\t\t\treturn true\n+\t\t\tflag = 0\n+\t\t\treturn true, nil\n \t\t}\n+\t\treturn false, nil\n+\t}))\n+\tif flag == 0 {","path":"test/e2e/kubectl.go","position":23,"original_position":23,"commit_id":"1aecb15ab68eb0efa8879c416646f408582cad98","original_commit_id":"1aecb15ab68eb0efa8879c416646f408582cad98","user":{"login":"quinton-hoole","id":10390785,"avatar_url":"https://avatars.githubusercontent.com/u/10390785?v=3","gravatar_id":"","url":"https://api.github.com/users/quinton-hoole","html_url":"https://github.com/quinton-hoole","followers_url":"https://api.github.com/users/quinton-hoole/followers","following_url":"https://api.github.com/users/quinton-hoole/following{/other_user}","gists_url":"https://api.github.com/users/quinton-hoole/gists{/gist_id}","starred_url":"https://api.github.com/users/quinton-hoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinton-hoole/subscriptions","organizations_url":"https://api.github.com/users/quinton-hoole/orgs","repos_url":"https://api.github.com/users/quinton-hoole/repos","events_url":"https://api.github.com/users/quinton-hoole/events{/privacy}","received_events_url":"https://api.github.com/users/quinton-hoole/received_events","type":"User","site_admin":false},"body":"Can you actually get here without flag being zero?  If flag is 1, then you never succeeded, in which case Poll returns an error, expectNoError fails etc.","created_at":"2015-05-18T20:49:03Z","updated_at":"2015-05-18T20:49:03Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8399#discussion_r30545926","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8399","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/30545926"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8399#discussion_r30545926"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8399"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8399","id":35596631,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8399","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8399.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8399.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8399","number":8399,"state":"open","locked":false,"title":"improve e2e retry logic with standard wait.Poll()","user":{"login":"dalanlan","id":5979704,"avatar_url":"https://avatars.githubusercontent.com/u/5979704?v=3","gravatar_id":"","url":"https://api.github.com/users/dalanlan","html_url":"https://github.com/dalanlan","followers_url":"https://api.github.com/users/dalanlan/followers","following_url":"https://api.github.com/users/dalanlan/following{/other_user}","gists_url":"https://api.github.com/users/dalanlan/gists{/gist_id}","starred_url":"https://api.github.com/users/dalanlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalanlan/subscriptions","organizations_url":"https://api.github.com/users/dalanlan/orgs","repos_url":"https://api.github.com/users/dalanlan/repos","events_url":"https://api.github.com/users/dalanlan/events{/privacy}","received_events_url":"https://api.github.com/users/dalanlan/received_events","type":"User","site_admin":false},"body":"improve original `for` retry logic with standard `wait.Poll` in e2e tests.\r\nSigned-off-by: He Simei <hesimei@zju.edu.cn>","created_at":"2015-05-18T00:43:49Z","updated_at":"2015-05-18T20:49:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32052d94f5964008143cc4fd61b38b3803c8b80c","assignee":{"login":"quinton-hoole","id":10390785,"avatar_url":"https://avatars.githubusercontent.com/u/10390785?v=3","gravatar_id":"","url":"https://api.github.com/users/quinton-hoole","html_url":"https://github.com/quinton-hoole","followers_url":"https://api.github.com/users/quinton-hoole/followers","following_url":"https://api.github.com/users/quinton-hoole/following{/other_user}","gists_url":"https://api.github.com/users/quinton-hoole/gists{/gist_id}","starred_url":"https://api.github.com/users/quinton-hoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinton-hoole/subscriptions","organizations_url":"https://api.github.com/users/quinton-hoole/orgs","repos_url":"https://api.github.com/users/quinton-hoole/repos","events_url":"https://api.github.com/users/quinton-hoole/events{/privacy}","received_events_url":"https://api.github.com/users/quinton-hoole/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8399/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8399/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8399/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/1aecb15ab68eb0efa8879c416646f408582cad98","head":{"label":"ZJU-SEL:improve_e2e_retry_logic","ref":"improve_e2e_retry_logic","sha":"1aecb15ab68eb0efa8879c416646f408582cad98","user":{"login":"ZJU-SEL","id":5188515,"avatar_url":"https://avatars.githubusercontent.com/u/5188515?v=3","gravatar_id":"","url":"https://api.github.com/users/ZJU-SEL","html_url":"https://github.com/ZJU-SEL","followers_url":"https://api.github.com/users/ZJU-SEL/followers","following_url":"https://api.github.com/users/ZJU-SEL/following{/other_user}","gists_url":"https://api.github.com/users/ZJU-SEL/gists{/gist_id}","starred_url":"https://api.github.com/users/ZJU-SEL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZJU-SEL/subscriptions","organizations_url":"https://api.github.com/users/ZJU-SEL/orgs","repos_url":"https://api.github.com/users/ZJU-SEL/repos","events_url":"https://api.github.com/users/ZJU-SEL/events{/privacy}","received_events_url":"https://api.github.com/users/ZJU-SEL/received_events","type":"Organization","site_admin":false},"repo":{"id":29713851,"name":"kubernetes","full_name":"ZJU-SEL/kubernetes","owner":{"login":"ZJU-SEL","id":5188515,"avatar_url":"https://avatars.githubusercontent.com/u/5188515?v=3","gravatar_id":"","url":"https://api.github.com/users/ZJU-SEL","html_url":"https://github.com/ZJU-SEL","followers_url":"https://api.github.com/users/ZJU-SEL/followers","following_url":"https://api.github.com/users/ZJU-SEL/following{/other_user}","gists_url":"https://api.github.com/users/ZJU-SEL/gists{/gist_id}","starred_url":"https://api.github.com/users/ZJU-SEL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZJU-SEL/subscriptions","organizations_url":"https://api.github.com/users/ZJU-SEL/orgs","repos_url":"https://api.github.com/users/ZJU-SEL/repos","events_url":"https://api.github.com/users/ZJU-SEL/events{/privacy}","received_events_url":"https://api.github.com/users/ZJU-SEL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ZJU-SEL/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/ZJU-SEL/kubernetes","forks_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/forks","keys_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/teams","hooks_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/events","assignees_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/tags","blobs_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/languages","stargazers_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/subscription","commits_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/merges","archive_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/downloads","issues_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/releases{/id}","created_at":"2015-01-23T03:02:22Z","updated_at":"2015-04-22T03:03:07Z","pushed_at":"2015-05-18T12:11:16Z","git_url":"git://github.com/ZJU-SEL/kubernetes.git","ssh_url":"git@github.com:ZJU-SEL/kubernetes.git","clone_url":"https://github.com/ZJU-SEL/kubernetes.git","svn_url":"https://github.com/ZJU-SEL/kubernetes","homepage":"http://kubernetes.io","size":56164,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"efb42b302d871f7217394205d84e5ae82335d786","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-05-18T19:30:33Z","pushed_at":"2015-05-18T20:45:13Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":273269,"stargazers_count":7711,"watchers_count":7711,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1589,"mirror_url":null,"open_issues_count":1111,"forks":1589,"open_issues":1111,"watchers":7711,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8399"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8399"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8399"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8399/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8399/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8399/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/1aecb15ab68eb0efa8879c416646f408582cad98"}}}}