payload: {"action":"created","issue":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb-go/issues/460","repository_url":"https://api.github.com/repos/rethinkdb/rethinkdb-go","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb-go/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/rethinkdb/rethinkdb-go/issues/460/comments","events_url":"https://api.github.com/repos/rethinkdb/rethinkdb-go/issues/460/events","html_url":"https://github.com/rethinkdb/rethinkdb-go/pull/460","id":434756534,"node_id":"MDExOlB1bGxSZXF1ZXN0MjcxNjc3NjYw","number":460,"title":"Add ability to block cursors when testing with mocks","user":{"login":"arnodel","id":1611065,"node_id":"MDQ6VXNlcjE2MTEwNjU=","avatar_url":"https://avatars0.githubusercontent.com/u/1611065?v=4","gravatar_id":"","url":"https://api.github.com/users/arnodel","html_url":"https://github.com/arnodel","followers_url":"https://api.github.com/users/arnodel/followers","following_url":"https://api.github.com/users/arnodel/following{/other_user}","gists_url":"https://api.github.com/users/arnodel/gists{/gist_id}","starred_url":"https://api.github.com/users/arnodel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnodel/subscriptions","organizations_url":"https://api.github.com/users/arnodel/orgs","repos_url":"https://api.github.com/users/arnodel/repos","events_url":"https://api.github.com/users/arnodel/events{/privacy}","received_events_url":"https://api.github.com/users/arnodel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-04-18T12:56:40Z","updated_at":"2019-04-19T09:23:33Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb-go/pulls/460","html_url":"https://github.com/rethinkdb/rethinkdb-go/pull/460","diff_url":"https://github.com/rethinkdb/rethinkdb-go/pull/460.diff","patch_url":"https://github.com/rethinkdb/rethinkdb-go/pull/460.patch"},"body":"If you want the cursor to block on some of the response values, you can pass in\r\na value of type `chan interface{}` to `MockQuery.Return()` and the cursor will block until a value is\r\navailable to read on the channel.  Or you can pass in a function with signature\r\n`func() interface{}`: the cursor will call the function (which may block).  Here\r\nis the example above adapted to use a channel."},"comment":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb-go/issues/comments/484824807","html_url":"https://github.com/rethinkdb/rethinkdb-go/pull/460#issuecomment-484824807","issue_url":"https://api.github.com/repos/rethinkdb/rethinkdb-go/issues/460","id":484824807,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4NDgyNDgwNw==","user":{"login":"CMogilko","id":2893054,"node_id":"MDQ6VXNlcjI4OTMwNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2893054?v=4","gravatar_id":"","url":"https://api.github.com/users/CMogilko","html_url":"https://github.com/CMogilko","followers_url":"https://api.github.com/users/CMogilko/followers","following_url":"https://api.github.com/users/CMogilko/following{/other_user}","gists_url":"https://api.github.com/users/CMogilko/gists{/gist_id}","starred_url":"https://api.github.com/users/CMogilko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CMogilko/subscriptions","organizations_url":"https://api.github.com/users/CMogilko/orgs","repos_url":"https://api.github.com/users/CMogilko/repos","events_url":"https://api.github.com/users/CMogilko/events{/privacy}","received_events_url":"https://api.github.com/users/CMogilko/received_events","type":"User","site_admin":false},"created_at":"2019-04-19T09:23:33Z","updated_at":"2019-04-19T09:23:33Z","author_association":"MEMBER","body":"I don't think that using hacks in a production code (cursor.go is a production code) is a good idea. This affects performance and also breaks isolation, because now production code depends on testing data types. \r\nThe right way is to mock the whole `Cursor`, but it isn't an `interface` due to some historical decision made by original author of the driver. But I don't see any strong reasons to break back compatibility only for testing. May be in the future it can happens."}}
other: {"actor":{"display_login":"CMogilko"}}