{"action":"created","issue":{"url":"https://api.github.com/repos/maximilien/softlayer-go/issues/133","repository_url":"https://api.github.com/repos/maximilien/softlayer-go","labels_url":"https://api.github.com/repos/maximilien/softlayer-go/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/maximilien/softlayer-go/issues/133/comments","events_url":"https://api.github.com/repos/maximilien/softlayer-go/issues/133/events","html_url":"https://github.com/maximilien/softlayer-go/pull/133","id":173003990,"number":133,"title":"Retry when timeout error returned from http client","user":{"login":"mattcui","id":3347572,"avatar_url":"https://avatars.githubusercontent.com/u/3347572?v=3","gravatar_id":"","url":"https://api.github.com/users/mattcui","html_url":"https://github.com/mattcui","followers_url":"https://api.github.com/users/mattcui/followers","following_url":"https://api.github.com/users/mattcui/following{/other_user}","gists_url":"https://api.github.com/users/mattcui/gists{/gist_id}","starred_url":"https://api.github.com/users/mattcui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattcui/subscriptions","organizations_url":"https://api.github.com/users/mattcui/orgs","repos_url":"https://api.github.com/users/mattcui/repos","events_url":"https://api.github.com/users/mattcui/events{/privacy}","received_events_url":"https://api.github.com/users/mattcui/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/maximilien/softlayer-go/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"maximilien","id":39187,"avatar_url":"https://avatars.githubusercontent.com/u/39187?v=3","gravatar_id":"","url":"https://api.github.com/users/maximilien","html_url":"https://github.com/maximilien","followers_url":"https://api.github.com/users/maximilien/followers","following_url":"https://api.github.com/users/maximilien/following{/other_user}","gists_url":"https://api.github.com/users/maximilien/gists{/gist_id}","starred_url":"https://api.github.com/users/maximilien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximilien/subscriptions","organizations_url":"https://api.github.com/users/maximilien/orgs","repos_url":"https://api.github.com/users/maximilien/repos","events_url":"https://api.github.com/users/maximilien/events{/privacy}","received_events_url":"https://api.github.com/users/maximilien/received_events","type":"User","site_admin":false},"assignees":[{"login":"maximilien","id":39187,"avatar_url":"https://avatars.githubusercontent.com/u/39187?v=3","gravatar_id":"","url":"https://api.github.com/users/maximilien","html_url":"https://github.com/maximilien","followers_url":"https://api.github.com/users/maximilien/followers","following_url":"https://api.github.com/users/maximilien/following{/other_user}","gists_url":"https://api.github.com/users/maximilien/gists{/gist_id}","starred_url":"https://api.github.com/users/maximilien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximilien/subscriptions","organizations_url":"https://api.github.com/users/maximilien/orgs","repos_url":"https://api.github.com/users/maximilien/repos","events_url":"https://api.github.com/users/maximilien/events{/privacy}","received_events_url":"https://api.github.com/users/maximilien/received_events","type":"User","site_admin":false},{"login":"mattcui","id":3347572,"avatar_url":"https://avatars.githubusercontent.com/u/3347572?v=3","gravatar_id":"","url":"https://api.github.com/users/mattcui","html_url":"https://github.com/mattcui","followers_url":"https://api.github.com/users/mattcui/followers","following_url":"https://api.github.com/users/mattcui/following{/other_user}","gists_url":"https://api.github.com/users/mattcui/gists{/gist_id}","starred_url":"https://api.github.com/users/mattcui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattcui/subscriptions","organizations_url":"https://api.github.com/users/mattcui/orgs","repos_url":"https://api.github.com/users/mattcui/repos","events_url":"https://api.github.com/users/mattcui/events{/privacy}","received_events_url":"https://api.github.com/users/mattcui/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-08-24T16:50:09Z","updated_at":"2016-08-25T21:51:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/maximilien/softlayer-go/pulls/133","html_url":"https://github.com/maximilien/softlayer-go/pull/133","diff_url":"https://github.com/maximilien/softlayer-go/pull/133.diff","patch_url":"https://github.com/maximilien/softlayer-go/pull/133.patch"},"body":"@maximilien I followed [gomega ghttp approach](https://onsi.github.io/gomega/#ghttp-testing-http-clients) to write the unit test. It's running a real http server, so it's also pretty like integration test when sending requests from the http client. I had to update Godeps to update gomega and added  ghttp. Please help review. Thanks."},"comment":{"url":"https://api.github.com/repos/maximilien/softlayer-go/issues/comments/242553615","html_url":"https://github.com/maximilien/softlayer-go/pull/133#issuecomment-242553615","issue_url":"https://api.github.com/repos/maximilien/softlayer-go/issues/133","id":242553615,"user":{"login":"maximilien","id":39187,"avatar_url":"https://avatars.githubusercontent.com/u/39187?v=3","gravatar_id":"","url":"https://api.github.com/users/maximilien","html_url":"https://github.com/maximilien","followers_url":"https://api.github.com/users/maximilien/followers","following_url":"https://api.github.com/users/maximilien/following{/other_user}","gists_url":"https://api.github.com/users/maximilien/gists{/gist_id}","starred_url":"https://api.github.com/users/maximilien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximilien/subscriptions","organizations_url":"https://api.github.com/users/maximilien/orgs","repos_url":"https://api.github.com/users/maximilien/repos","events_url":"https://api.github.com/users/maximilien/events{/privacy}","received_events_url":"https://api.github.com/users/maximilien/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T21:51:33Z","updated_at":"2016-08-25T21:51:33Z","body":"Hey I wonder if we should make the default retry 1. That way all current users would not have the side effects of retry. If they need it then they should set the env, like in your case.\r\n\r\nAlso, I feel you should have more tests. Specifically, I am thinking of tests that cause failures during retry and then succeeds and overall succeeds the test. So something like with 5 retry:\r\n\r\n1. fails\r\n2. fails\r\n3. succeeds\r\n\r\nAll good. And:\r\n\r\n1. fails\r\n2. fails\r\n3. fails\r\n4. fails\r\n5. succeed\r\n\r\nall good. So essentially verifying that all cases (first try, middle try, and last try work).  \r\n\r\nFinally, you should also have tests that verify that the retry count value and wait value are set with env variable. So if you set env before that the new retry count is updated.\r\n\r\nDo these and I will merge. Looking better. Thx."}}
{"actor":{"display_login":"maximilien"}}