{"action":"opened","issue":{"url":"https://api.github.com/repos/couchbase/sync_gateway/issues/1441","labels_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/1441/labels{/name}","comments_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/1441/comments","events_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/1441/events","html_url":"https://github.com/couchbase/sync_gateway/issues/1441","id":126306776,"number":1441,"title":"Add unit tests for functional blocks in changes, vector_changes","user":{"login":"adamcfraser","id":8866453,"avatar_url":"https://avatars.githubusercontent.com/u/8866453?v=3","gravatar_id":"","url":"https://api.github.com/users/adamcfraser","html_url":"https://github.com/adamcfraser","followers_url":"https://api.github.com/users/adamcfraser/followers","following_url":"https://api.github.com/users/adamcfraser/following{/other_user}","gists_url":"https://api.github.com/users/adamcfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/adamcfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamcfraser/subscriptions","organizations_url":"https://api.github.com/users/adamcfraser/orgs","repos_url":"https://api.github.com/users/adamcfraser/repos","events_url":"https://api.github.com/users/adamcfraser/events{/privacy}","received_events_url":"https://api.github.com/users/adamcfraser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-12T23:56:19Z","updated_at":"2016-01-12T23:56:19Z","closed_at":null,"body":"Both changes.go and vector_changes.go are highly complex chunks of code, and can be difficult to test thoroughly (partly due to the difficulty of unit testing continuous changes feeds without hitting test race issues).\r\n\r\n@tleyden suggested writing smaller unit tests for subsets of the functionality, based on moving that functionality to a separate function call (as was done partially for vector_changes in  https://github.com/couchbase/sync_gateway/pull/1439).  This would make it more straightforward to test boundary/failure states without the complexity of the full changes feed."}}