{"action":"created","issue":{"url":"https://api.github.com/repos/Shopify/sarama/issues/508","labels_url":"https://api.github.com/repos/Shopify/sarama/issues/508/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/sarama/issues/508/comments","events_url":"https://api.github.com/repos/Shopify/sarama/issues/508/events","html_url":"https://github.com/Shopify/sarama/pull/508","id":100585029,"number":508,"title":"[WIP] Offset manager tests","user":{"login":"aaronkavlie-wf","id":7768348,"avatar_url":"https://avatars.githubusercontent.com/u/7768348?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronkavlie-wf","html_url":"https://github.com/aaronkavlie-wf","followers_url":"https://api.github.com/users/aaronkavlie-wf/followers","following_url":"https://api.github.com/users/aaronkavlie-wf/following{/other_user}","gists_url":"https://api.github.com/users/aaronkavlie-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronkavlie-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronkavlie-wf/subscriptions","organizations_url":"https://api.github.com/users/aaronkavlie-wf/orgs","repos_url":"https://api.github.com/users/aaronkavlie-wf/repos","events_url":"https://api.github.com/users/aaronkavlie-wf/events{/privacy}","received_events_url":"https://api.github.com/users/aaronkavlie-wf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-08-12T16:42:32Z","updated_at":"2015-10-13T08:33:04Z","closed_at":"2015-08-18T20:00:24Z","pull_request":{"url":"https://api.github.com/repos/Shopify/sarama/pulls/508","html_url":"https://github.com/Shopify/sarama/pull/508","diff_url":"https://github.com/Shopify/sarama/pull/508.diff","patch_url":"https://github.com/Shopify/sarama/pull/508.patch"},"body":"This PR adds tests for the offset manager in PR #461.\r\nThe majority of the code now has coverage.\r\n\r\nNotes\r\n--------\r\n\r\n- I was unable to reach the `bom.updateSubscriptions` loop in the `brokerOffsetManager.abort()` method; pointers for that would be appreciated.\r\n\r\n- The tests use a pretty simple setup; adding a second partition offset manager (in an attempt to reach the code in the previous point) led to a a broker unreference/refresh and a need for more mock responses that I didn't get to.\r\n\r\n- After spending a while with it, the code is still somewhat difficult to reason about, due to a lot of channels and resultant side effects. Also, 3 different objects whose responsibilities are not totally clear.\r\n\r\n@eapache @wvanbergen @horkhe "},"comment":{"url":"https://api.github.com/repos/Shopify/sarama/issues/comments/147647284","html_url":"https://github.com/Shopify/sarama/pull/508#issuecomment-147647284","issue_url":"https://api.github.com/repos/Shopify/sarama/issues/508","id":147647284,"user":{"login":"wvanbergen","id":15870,"avatar_url":"https://avatars.githubusercontent.com/u/15870?v=3","gravatar_id":"","url":"https://api.github.com/users/wvanbergen","html_url":"https://github.com/wvanbergen","followers_url":"https://api.github.com/users/wvanbergen/followers","following_url":"https://api.github.com/users/wvanbergen/following{/other_user}","gists_url":"https://api.github.com/users/wvanbergen/gists{/gist_id}","starred_url":"https://api.github.com/users/wvanbergen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvanbergen/subscriptions","organizations_url":"https://api.github.com/users/wvanbergen/orgs","repos_url":"https://api.github.com/users/wvanbergen/repos","events_url":"https://api.github.com/users/wvanbergen/events{/privacy}","received_events_url":"https://api.github.com/users/wvanbergen/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T08:33:04Z","updated_at":"2015-10-13T08:33:04Z","body":"Godoc documentation: https://godoc.org/github.com/Shopify/sarama#OffsetManager\r\n\r\nThis is a building block that stores offsets in Kafka, but doesn't automatically deal with offsets for you. You still have to use this API yourself in your consumer implementation. Example: https://github.com/wvanbergen/kafka/pull/72\r\n"}}