{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/61183598","id":61183598,"diff_hunk":"@@ -173,15 +173,15 @@ public boolean start() {\n \n     @Override\n     public boolean advance() {\n-      if (current >= numMessagesPerShard) {\n+      if (current >= numMessagesPerShard - 1) {\n         return false;\n       }","path":"sdks/java/core/src/test/java/org/apache/beam/sdk/runners/dataflow/TestCountingSource.java","position":7,"original_position":7,"commit_id":"2631624ae820df66206d8bdcc2e1d84bedbc696a","original_commit_id":"2631624ae820df66206d8bdcc2e1d84bedbc696a","user":{"login":"mshields822","id":11642236,"avatar_url":"https://avatars.githubusercontent.com/u/11642236?v=3","gravatar_id":"","url":"https://api.github.com/users/mshields822","html_url":"https://github.com/mshields822","followers_url":"https://api.github.com/users/mshields822/followers","following_url":"https://api.github.com/users/mshields822/following{/other_user}","gists_url":"https://api.github.com/users/mshields822/gists{/gist_id}","starred_url":"https://api.github.com/users/mshields822/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshields822/subscriptions","organizations_url":"https://api.github.com/users/mshields822/orgs","repos_url":"https://api.github.com/users/mshields822/repos","events_url":"https://api.github.com/users/mshields822/events{/privacy}","received_events_url":"https://api.github.com/users/mshields822/received_events","type":"User","site_admin":false},"body":"I prefer this order - if done early exit, if want to repeat repeat, otherwise advance to valid position.\r\n","created_at":"2016-04-26T23:45:37Z","updated_at":"2016-04-26T23:45:37Z","html_url":"https://github.com/apache/incubator-beam/pull/248#discussion_r61183598","pull_request_url":"https://api.github.com/repos/apache/incubator-beam/pulls/248","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/61183598"},"html":{"href":"https://github.com/apache/incubator-beam/pull/248#discussion_r61183598"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/248"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/248","id":67975317,"html_url":"https://github.com/apache/incubator-beam/pull/248","diff_url":"https://github.com/apache/incubator-beam/pull/248.diff","patch_url":"https://github.com/apache/incubator-beam/pull/248.patch","issue_url":"https://api.github.com/repos/apache/incubator-beam/issues/248","number":248,"state":"open","locked":false,"title":"[BEAM-222] Don't advance beyond last valid value","user":{"login":"mshields822","id":11642236,"avatar_url":"https://avatars.githubusercontent.com/u/11642236?v=3","gravatar_id":"","url":"https://api.github.com/users/mshields822","html_url":"https://github.com/mshields822","followers_url":"https://api.github.com/users/mshields822/followers","following_url":"https://api.github.com/users/mshields822/following{/other_user}","gists_url":"https://api.github.com/users/mshields822/gists{/gist_id}","starred_url":"https://api.github.com/users/mshields822/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshields822/subscriptions","organizations_url":"https://api.github.com/users/mshields822/orgs","repos_url":"https://api.github.com/users/mshields822/repos","events_url":"https://api.github.com/users/mshields822/events{/privacy}","received_events_url":"https://api.github.com/users/mshields822/received_events","type":"User","site_admin":false},"body":"Turns out there was a bug with allowing 'advanced beyond last element' to be a valid counter state.\r\nOnly an internal reload test caught it.\r\nIncluded unit test for that case.","created_at":"2016-04-26T23:36:39Z","updated_at":"2016-04-26T23:45:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da3c02cdf7e4d68e7a9ab37b1a5f0c0005812429","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-beam/pulls/248/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-beam/pulls/248/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-beam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-beam/issues/248/comments","statuses_url":"https://api.github.com/repos/apache/incubator-beam/statuses/2631624ae820df66206d8bdcc2e1d84bedbc696a","head":{"label":"mshields822:beam-222","ref":"beam-222","sha":"2631624ae820df66206d8bdcc2e1d84bedbc696a","user":{"login":"mshields822","id":11642236,"avatar_url":"https://avatars.githubusercontent.com/u/11642236?v=3","gravatar_id":"","url":"https://api.github.com/users/mshields822","html_url":"https://github.com/mshields822","followers_url":"https://api.github.com/users/mshields822/followers","following_url":"https://api.github.com/users/mshields822/following{/other_user}","gists_url":"https://api.github.com/users/mshields822/gists{/gist_id}","starred_url":"https://api.github.com/users/mshields822/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshields822/subscriptions","organizations_url":"https://api.github.com/users/mshields822/orgs","repos_url":"https://api.github.com/users/mshields822/repos","events_url":"https://api.github.com/users/mshields822/events{/privacy}","received_events_url":"https://api.github.com/users/mshields822/received_events","type":"User","site_admin":false},"repo":{"id":52641502,"name":"incubator-beam","full_name":"mshields822/incubator-beam","owner":{"login":"mshields822","id":11642236,"avatar_url":"https://avatars.githubusercontent.com/u/11642236?v=3","gravatar_id":"","url":"https://api.github.com/users/mshields822","html_url":"https://github.com/mshields822","followers_url":"https://api.github.com/users/mshields822/followers","following_url":"https://api.github.com/users/mshields822/following{/other_user}","gists_url":"https://api.github.com/users/mshields822/gists{/gist_id}","starred_url":"https://api.github.com/users/mshields822/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshields822/subscriptions","organizations_url":"https://api.github.com/users/mshields822/orgs","repos_url":"https://api.github.com/users/mshields822/repos","events_url":"https://api.github.com/users/mshields822/events{/privacy}","received_events_url":"https://api.github.com/users/mshields822/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mshields822/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":true,"url":"https://api.github.com/repos/mshields822/incubator-beam","forks_url":"https://api.github.com/repos/mshields822/incubator-beam/forks","keys_url":"https://api.github.com/repos/mshields822/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mshields822/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mshields822/incubator-beam/teams","hooks_url":"https://api.github.com/repos/mshields822/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/mshields822/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/mshields822/incubator-beam/events","assignees_url":"https://api.github.com/repos/mshields822/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/mshields822/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/mshields822/incubator-beam/tags","blobs_url":"https://api.github.com/repos/mshields822/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mshields822/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mshields822/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/mshields822/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mshields822/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/mshields822/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/mshields822/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/mshields822/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/mshields822/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/mshields822/incubator-beam/subscription","commits_url":"https://api.github.com/repos/mshields822/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/mshields822/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/mshields822/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/mshields822/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/mshields822/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/mshields822/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mshields822/incubator-beam/merges","archive_url":"https://api.github.com/repos/mshields822/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mshields822/incubator-beam/downloads","issues_url":"https://api.github.com/repos/mshields822/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/mshields822/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/mshields822/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/mshields822/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mshields822/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/mshields822/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/mshields822/incubator-beam/deployments","created_at":"2016-02-27T00:22:15Z","updated_at":"2016-02-27T00:22:17Z","pushed_at":"2016-04-26T23:34:51Z","git_url":"git://github.com/mshields822/incubator-beam.git","ssh_url":"git@github.com:mshields822/incubator-beam.git","clone_url":"https://github.com/mshields822/incubator-beam.git","svn_url":"https://github.com/mshields822/incubator-beam","homepage":null,"size":13184,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"7bd2d365ae1fe6afb02299637f17487481bc347d","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":50904245,"name":"incubator-beam","full_name":"apache/incubator-beam","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-beam","forks_url":"https://api.github.com/repos/apache/incubator-beam/forks","keys_url":"https://api.github.com/repos/apache/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-beam/teams","hooks_url":"https://api.github.com/repos/apache/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-beam/events","assignees_url":"https://api.github.com/repos/apache/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-beam/tags","blobs_url":"https://api.github.com/repos/apache/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-beam/subscription","commits_url":"https://api.github.com/repos/apache/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-beam/merges","archive_url":"https://api.github.com/repos/apache/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-beam/downloads","issues_url":"https://api.github.com/repos/apache/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-beam/deployments","created_at":"2016-02-02T08:00:06Z","updated_at":"2016-04-26T18:02:16Z","pushed_at":"2016-04-26T23:44:37Z","git_url":"git://github.com/apache/incubator-beam.git","ssh_url":"git@github.com:apache/incubator-beam.git","clone_url":"https://github.com/apache/incubator-beam.git","svn_url":"https://github.com/apache/incubator-beam","homepage":null,"size":14320,"stargazers_count":144,"watchers_count":144,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":73,"mirror_url":"git://git.apache.org/incubator-beam.git","open_issues_count":15,"forks":73,"open_issues":15,"watchers":144,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/248"},"html":{"href":"https://github.com/apache/incubator-beam/pull/248"},"issue":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/248"},"comments":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/248/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/248/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/248/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-beam/statuses/2631624ae820df66206d8bdcc2e1d84bedbc696a"}}}}