{"action":"created","comment":{"url":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/comments/107541579","pull_request_review_id":28521028,"id":107541579,"diff_hunk":"@@ -181,6 +181,59 @@ def test_completion_on_finalize(self):\n         with self.assertRaises(StopIteration):\n             next(iterable)\n \n+    def test_completion_on_last_result(self):\n+        \"\"\"Tests the that the schedule is not marked complete until the last\n+        result is set.\n+\n+        Adds three batches with varying number of transactions, then tests\n+        that they are returned in the appropriate order when using an iterator.\n+        Test that the value of `complete` is false until the last value.\n+\n+        This test also finalizes the scheduler and verifies that StopIteration\n+        is thrown by the iterator, and the complete is true in the at the end.\n+        \"\"\"\n+        private_key = signing.generate_privkey()\n+        public_key = signing.generate_pubkey(private_key)\n+\n+        context_manager = ContextManager(dict_database.DictDatabase())","path":"validator/tests/unit3/test_scheduler/tests.py","position":18,"original_position":18,"commit_id":"481f2021aaa1d971aa40b386ce76dcb908ce2ece","original_commit_id":"481f2021aaa1d971aa40b386ce76dcb908ce2ece","user":{"login":"boydjohnson","id":4340785,"avatar_url":"https://avatars2.githubusercontent.com/u/4340785?v=3","gravatar_id":"","url":"https://api.github.com/users/boydjohnson","html_url":"https://github.com/boydjohnson","followers_url":"https://api.github.com/users/boydjohnson/followers","following_url":"https://api.github.com/users/boydjohnson/following{/other_user}","gists_url":"https://api.github.com/users/boydjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/boydjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boydjohnson/subscriptions","organizations_url":"https://api.github.com/users/boydjohnson/orgs","repos_url":"https://api.github.com/users/boydjohnson/repos","events_url":"https://api.github.com/users/boydjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/boydjohnson/received_events","type":"User","site_admin":false},"body":"The context_manager now needs to be explicitly shutdown. In other scheduler tests there are setUp and tearDown methods doing that. ","created_at":"2017-03-22T21:46:41Z","updated_at":"2017-03-22T21:46:48Z","html_url":"https://github.com/hyperledger/sawtooth-core/pull/242#discussion_r107541579","pull_request_url":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/242","_links":{"self":{"href":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/comments/107541579"},"html":{"href":"https://github.com/hyperledger/sawtooth-core/pull/242#discussion_r107541579"},"pull_request":{"href":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/242"}}},"pull_request":{"url":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/242","id":112101147,"html_url":"https://github.com/hyperledger/sawtooth-core/pull/242","diff_url":"https://github.com/hyperledger/sawtooth-core/pull/242.diff","patch_url":"https://github.com/hyperledger/sawtooth-core/pull/242.patch","issue_url":"https://api.github.com/repos/hyperledger/sawtooth-core/issues/242","number":242,"state":"open","locked":false,"title":"Mark the schedule as complete on set response","user":{"login":"peterschwarz","id":282233,"avatar_url":"https://avatars3.githubusercontent.com/u/282233?v=3","gravatar_id":"","url":"https://api.github.com/users/peterschwarz","html_url":"https://github.com/peterschwarz","followers_url":"https://api.github.com/users/peterschwarz/followers","following_url":"https://api.github.com/users/peterschwarz/following{/other_user}","gists_url":"https://api.github.com/users/peterschwarz/gists{/gist_id}","starred_url":"https://api.github.com/users/peterschwarz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterschwarz/subscriptions","organizations_url":"https://api.github.com/users/peterschwarz/orgs","repos_url":"https://api.github.com/users/peterschwarz/repos","events_url":"https://api.github.com/users/peterschwarz/events{/privacy}","received_events_url":"https://api.github.com/users/peterschwarz/received_events","type":"User","site_admin":false},"body":"The serial scheduler marks the schedule as complete when it recieves\r\nresponses, not when its queue is empty.  If the queue size is used to\r\ndetermine comleteness, the schedule is marked as complete before a\r\ntransaction processor has replied with a result - this results in\r\ngenesis batch processing failing.\r\n\r\nSigned-off-by: Peter Schwarz <peterx.schwarz@intel.com>","created_at":"2017-03-22T20:17:56Z","updated_at":"2017-03-22T21:46:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20e50ec7cda3033a03e084fcd17f5b879788f76c","assignee":{"login":"peterschwarz","id":282233,"avatar_url":"https://avatars3.githubusercontent.com/u/282233?v=3","gravatar_id":"","url":"https://api.github.com/users/peterschwarz","html_url":"https://github.com/peterschwarz","followers_url":"https://api.github.com/users/peterschwarz/followers","following_url":"https://api.github.com/users/peterschwarz/following{/other_user}","gists_url":"https://api.github.com/users/peterschwarz/gists{/gist_id}","starred_url":"https://api.github.com/users/peterschwarz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterschwarz/subscriptions","organizations_url":"https://api.github.com/users/peterschwarz/orgs","repos_url":"https://api.github.com/users/peterschwarz/repos","events_url":"https://api.github.com/users/peterschwarz/events{/privacy}","received_events_url":"https://api.github.com/users/peterschwarz/received_events","type":"User","site_admin":false},"assignees":[{"login":"peterschwarz","id":282233,"avatar_url":"https://avatars3.githubusercontent.com/u/282233?v=3","gravatar_id":"","url":"https://api.github.com/users/peterschwarz","html_url":"https://github.com/peterschwarz","followers_url":"https://api.github.com/users/peterschwarz/followers","following_url":"https://api.github.com/users/peterschwarz/following{/other_user}","gists_url":"https://api.github.com/users/peterschwarz/gists{/gist_id}","starred_url":"https://api.github.com/users/peterschwarz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterschwarz/subscriptions","organizations_url":"https://api.github.com/users/peterschwarz/orgs","repos_url":"https://api.github.com/users/peterschwarz/repos","events_url":"https://api.github.com/users/peterschwarz/events{/privacy}","received_events_url":"https://api.github.com/users/peterschwarz/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/242/commits","review_comments_url":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/242/comments","review_comment_url":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyperledger/sawtooth-core/issues/242/comments","statuses_url":"https://api.github.com/repos/hyperledger/sawtooth-core/statuses/481f2021aaa1d971aa40b386ce76dcb908ce2ece","head":{"label":"peterschwarz:fix_serial_scheduler_complete_check","ref":"fix_serial_scheduler_complete_check","sha":"481f2021aaa1d971aa40b386ce76dcb908ce2ece","user":{"login":"peterschwarz","id":282233,"avatar_url":"https://avatars3.githubusercontent.com/u/282233?v=3","gravatar_id":"","url":"https://api.github.com/users/peterschwarz","html_url":"https://github.com/peterschwarz","followers_url":"https://api.github.com/users/peterschwarz/followers","following_url":"https://api.github.com/users/peterschwarz/following{/other_user}","gists_url":"https://api.github.com/users/peterschwarz/gists{/gist_id}","starred_url":"https://api.github.com/users/peterschwarz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterschwarz/subscriptions","organizations_url":"https://api.github.com/users/peterschwarz/orgs","repos_url":"https://api.github.com/users/peterschwarz/repos","events_url":"https://api.github.com/users/peterschwarz/events{/privacy}","received_events_url":"https://api.github.com/users/peterschwarz/received_events","type":"User","site_admin":false},"repo":{"id":81613276,"name":"sawtooth-core","full_name":"peterschwarz/sawtooth-core","owner":{"login":"peterschwarz","id":282233,"avatar_url":"https://avatars3.githubusercontent.com/u/282233?v=3","gravatar_id":"","url":"https://api.github.com/users/peterschwarz","html_url":"https://github.com/peterschwarz","followers_url":"https://api.github.com/users/peterschwarz/followers","following_url":"https://api.github.com/users/peterschwarz/following{/other_user}","gists_url":"https://api.github.com/users/peterschwarz/gists{/gist_id}","starred_url":"https://api.github.com/users/peterschwarz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterschwarz/subscriptions","organizations_url":"https://api.github.com/users/peterschwarz/orgs","repos_url":"https://api.github.com/users/peterschwarz/repos","events_url":"https://api.github.com/users/peterschwarz/events{/privacy}","received_events_url":"https://api.github.com/users/peterschwarz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peterschwarz/sawtooth-core","description":"Core repository for Sawtooth Lake Distributed ledger","fork":true,"url":"https://api.github.com/repos/peterschwarz/sawtooth-core","forks_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/forks","keys_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/teams","hooks_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/hooks","issue_events_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/issues/events{/number}","events_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/events","assignees_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/assignees{/user}","branches_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/branches{/branch}","tags_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/tags","blobs_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/statuses/{sha}","languages_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/languages","stargazers_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/stargazers","contributors_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/contributors","subscribers_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/subscribers","subscription_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/subscription","commits_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/contents/{+path}","compare_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/merges","archive_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/downloads","issues_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/issues{/number}","pulls_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/pulls{/number}","milestones_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/milestones{/number}","notifications_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/labels{/name}","releases_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/releases{/id}","deployments_url":"https://api.github.com/repos/peterschwarz/sawtooth-core/deployments","created_at":"2017-02-10T22:36:38Z","updated_at":"2017-02-10T22:36:41Z","pushed_at":"2017-03-22T21:10:26Z","git_url":"git://github.com/peterschwarz/sawtooth-core.git","ssh_url":"git@github.com:peterschwarz/sawtooth-core.git","clone_url":"https://github.com/peterschwarz/sawtooth-core.git","svn_url":"https://github.com/peterschwarz/sawtooth-core","homepage":"http://intelledger.github.io/","size":17337,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"hyperledger:master","ref":"master","sha":"6b76fddfb736f38f08744b8c337b3f662571eda9","user":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars1.githubusercontent.com/u/7657900?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"repo":{"id":57901437,"name":"sawtooth-core","full_name":"hyperledger/sawtooth-core","owner":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars1.githubusercontent.com/u/7657900?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperledger/sawtooth-core","description":"Core repository for Sawtooth Lake Distributed ledger","fork":false,"url":"https://api.github.com/repos/hyperledger/sawtooth-core","forks_url":"https://api.github.com/repos/hyperledger/sawtooth-core/forks","keys_url":"https://api.github.com/repos/hyperledger/sawtooth-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperledger/sawtooth-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperledger/sawtooth-core/teams","hooks_url":"https://api.github.com/repos/hyperledger/sawtooth-core/hooks","issue_events_url":"https://api.github.com/repos/hyperledger/sawtooth-core/issues/events{/number}","events_url":"https://api.github.com/repos/hyperledger/sawtooth-core/events","assignees_url":"https://api.github.com/repos/hyperledger/sawtooth-core/assignees{/user}","branches_url":"https://api.github.com/repos/hyperledger/sawtooth-core/branches{/branch}","tags_url":"https://api.github.com/repos/hyperledger/sawtooth-core/tags","blobs_url":"https://api.github.com/repos/hyperledger/sawtooth-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperledger/sawtooth-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperledger/sawtooth-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperledger/sawtooth-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperledger/sawtooth-core/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperledger/sawtooth-core/languages","stargazers_url":"https://api.github.com/repos/hyperledger/sawtooth-core/stargazers","contributors_url":"https://api.github.com/repos/hyperledger/sawtooth-core/contributors","subscribers_url":"https://api.github.com/repos/hyperledger/sawtooth-core/subscribers","subscription_url":"https://api.github.com/repos/hyperledger/sawtooth-core/subscription","commits_url":"https://api.github.com/repos/hyperledger/sawtooth-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperledger/sawtooth-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperledger/sawtooth-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperledger/sawtooth-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperledger/sawtooth-core/contents/{+path}","compare_url":"https://api.github.com/repos/hyperledger/sawtooth-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperledger/sawtooth-core/merges","archive_url":"https://api.github.com/repos/hyperledger/sawtooth-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperledger/sawtooth-core/downloads","issues_url":"https://api.github.com/repos/hyperledger/sawtooth-core/issues{/number}","pulls_url":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperledger/sawtooth-core/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperledger/sawtooth-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperledger/sawtooth-core/labels{/name}","releases_url":"https://api.github.com/repos/hyperledger/sawtooth-core/releases{/id}","deployments_url":"https://api.github.com/repos/hyperledger/sawtooth-core/deployments","created_at":"2016-05-02T15:51:53Z","updated_at":"2017-03-22T08:00:01Z","pushed_at":"2017-03-22T21:23:50Z","git_url":"git://github.com/hyperledger/sawtooth-core.git","ssh_url":"git@github.com:hyperledger/sawtooth-core.git","clone_url":"https://github.com/hyperledger/sawtooth-core.git","svn_url":"https://github.com/hyperledger/sawtooth-core","homepage":"http://intelledger.github.io/","size":17335,"stargazers_count":200,"watchers_count":200,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":102,"mirror_url":null,"open_issues_count":8,"forks":102,"open_issues":8,"watchers":200,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/242"},"html":{"href":"https://github.com/hyperledger/sawtooth-core/pull/242"},"issue":{"href":"https://api.github.com/repos/hyperledger/sawtooth-core/issues/242"},"comments":{"href":"https://api.github.com/repos/hyperledger/sawtooth-core/issues/242/comments"},"review_comments":{"href":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/242/comments"},"review_comment":{"href":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyperledger/sawtooth-core/pulls/242/commits"},"statuses":{"href":"https://api.github.com/repos/hyperledger/sawtooth-core/statuses/481f2021aaa1d971aa40b386ce76dcb908ce2ece"}}}}
{"actor":{"display_login":"boydjohnson"}}