{"action":"closed","number":1168,"pull_request":{"url":"https://api.github.com/repos/rchain/rchain/pulls/1168","id":203505405,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNTA1NDA1","html_url":"https://github.com/rchain/rchain/pull/1168","diff_url":"https://github.com/rchain/rchain/pull/1168.diff","patch_url":"https://github.com/rchain/rchain/pull/1168.patch","issue_url":"https://api.github.com/repos/rchain/rchain/issues/1168","number":1168,"state":"closed","locked":false,"title":"CORE-892 Clean up Kademlia tests","user":{"login":"rabbitonweb","id":6287558,"node_id":"MDQ6VXNlcjYyODc1NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/6287558?v=4","gravatar_id":"","url":"https://api.github.com/users/rabbitonweb","html_url":"https://github.com/rabbitonweb","followers_url":"https://api.github.com/users/rabbitonweb/followers","following_url":"https://api.github.com/users/rabbitonweb/following{/other_user}","gists_url":"https://api.github.com/users/rabbitonweb/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitonweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitonweb/subscriptions","organizations_url":"https://api.github.com/users/rabbitonweb/orgs","repos_url":"https://api.github.com/users/rabbitonweb/repos","events_url":"https://api.github.com/users/rabbitonweb/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitonweb/received_events","type":"User","site_admin":false},"body":"## Overview\r\nThis PR makes `KademliaSpec` tests more readable and maintainable for the future.\r\nWhat was done:\r\n1. removed elements which were not needed in the test (like `distance` function)\r\n2. used `Capture[Id]` from shared\r\n3. Change tests to have single point of failure. So once they fail we know exactly why that happened.\r\n\r\nAfter running the tests it generates following output:\r\n\r\n```\r\n[info] KademliaSpec:\r\n[info] A PeertTable with 1 byte addresses and k = 3\r\n[info]   when adding a peer to an empty table\r\n[info]   - should add it to a bucket according to its distance\r\n[info]   - should not ping the peer\r\n[info]   when adding a peer to a table, where corresponding bucket is full\r\n[info]   - should ping the oldest peer to check if it responds\r\n[info]     and oldest peer IS responding to ping\r\n[info]     - should drop the new peer\r\n[info]     and oldest peer is NOT responding to ping\r\n[info]     - should add the new peer and drop the oldest one\r\n```\r\n\r\n@MParlikar FYI the above is what I've meant when talking about tests documenting the code. This should be part of the specification, generated automatically from testes.\r\n\r\n### Which JIRA issue does this PR relate to? If there is not a JIRA issue addressing this work, please create one now and add the link here.\r\nhttps://rchain.atlassian.net/secure/RapidBoard.jspa?rapidView=7&projectKey=CORE&modal=detail&selectedIssue=CORE-892\r\n","created_at":"2018-07-24T12:11:40Z","updated_at":"2018-07-24T14:36:27Z","closed_at":"2018-07-24T14:36:27Z","merged_at":"2018-07-24T14:36:27Z","merge_commit_sha":"0da99869f6580923fdb50d9a9691d39101936eb2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rchain/rchain/pulls/1168/commits","review_comments_url":"https://api.github.com/repos/rchain/rchain/pulls/1168/comments","review_comment_url":"https://api.github.com/repos/rchain/rchain/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rchain/rchain/issues/1168/comments","statuses_url":"https://api.github.com/repos/rchain/rchain/statuses/fb3b6484363c54bb1cac22e8846a0a501742ac18","head":{"label":"rabbitonweb:core-892","ref":"core-892","sha":"fb3b6484363c54bb1cac22e8846a0a501742ac18","user":{"login":"rabbitonweb","id":6287558,"node_id":"MDQ6VXNlcjYyODc1NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/6287558?v=4","gravatar_id":"","url":"https://api.github.com/users/rabbitonweb","html_url":"https://github.com/rabbitonweb","followers_url":"https://api.github.com/users/rabbitonweb/followers","following_url":"https://api.github.com/users/rabbitonweb/following{/other_user}","gists_url":"https://api.github.com/users/rabbitonweb/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitonweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitonweb/subscriptions","organizations_url":"https://api.github.com/users/rabbitonweb/orgs","repos_url":"https://api.github.com/users/rabbitonweb/repos","events_url":"https://api.github.com/users/rabbitonweb/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitonweb/received_events","type":"User","site_admin":false},"repo":{"id":120284121,"node_id":"MDEwOlJlcG9zaXRvcnkxMjAyODQxMjE=","name":"rchain","full_name":"rabbitonweb/rchain","owner":{"login":"rabbitonweb","id":6287558,"node_id":"MDQ6VXNlcjYyODc1NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/6287558?v=4","gravatar_id":"","url":"https://api.github.com/users/rabbitonweb","html_url":"https://github.com/rabbitonweb","followers_url":"https://api.github.com/users/rabbitonweb/followers","following_url":"https://api.github.com/users/rabbitonweb/following{/other_user}","gists_url":"https://api.github.com/users/rabbitonweb/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitonweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitonweb/subscriptions","organizations_url":"https://api.github.com/users/rabbitonweb/orgs","repos_url":"https://api.github.com/users/rabbitonweb/repos","events_url":"https://api.github.com/users/rabbitonweb/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitonweb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rabbitonweb/rchain","description":null,"fork":true,"url":"https://api.github.com/repos/rabbitonweb/rchain","forks_url":"https://api.github.com/repos/rabbitonweb/rchain/forks","keys_url":"https://api.github.com/repos/rabbitonweb/rchain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rabbitonweb/rchain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rabbitonweb/rchain/teams","hooks_url":"https://api.github.com/repos/rabbitonweb/rchain/hooks","issue_events_url":"https://api.github.com/repos/rabbitonweb/rchain/issues/events{/number}","events_url":"https://api.github.com/repos/rabbitonweb/rchain/events","assignees_url":"https://api.github.com/repos/rabbitonweb/rchain/assignees{/user}","branches_url":"https://api.github.com/repos/rabbitonweb/rchain/branches{/branch}","tags_url":"https://api.github.com/repos/rabbitonweb/rchain/tags","blobs_url":"https://api.github.com/repos/rabbitonweb/rchain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rabbitonweb/rchain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rabbitonweb/rchain/git/refs{/sha}","trees_url":"https://api.github.com/repos/rabbitonweb/rchain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rabbitonweb/rchain/statuses/{sha}","languages_url":"https://api.github.com/repos/rabbitonweb/rchain/languages","stargazers_url":"https://api.github.com/repos/rabbitonweb/rchain/stargazers","contributors_url":"https://api.github.com/repos/rabbitonweb/rchain/contributors","subscribers_url":"https://api.github.com/repos/rabbitonweb/rchain/subscribers","subscription_url":"https://api.github.com/repos/rabbitonweb/rchain/subscription","commits_url":"https://api.github.com/repos/rabbitonweb/rchain/commits{/sha}","git_commits_url":"https://api.github.com/repos/rabbitonweb/rchain/git/commits{/sha}","comments_url":"https://api.github.com/repos/rabbitonweb/rchain/comments{/number}","issue_comment_url":"https://api.github.com/repos/rabbitonweb/rchain/issues/comments{/number}","contents_url":"https://api.github.com/repos/rabbitonweb/rchain/contents/{+path}","compare_url":"https://api.github.com/repos/rabbitonweb/rchain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rabbitonweb/rchain/merges","archive_url":"https://api.github.com/repos/rabbitonweb/rchain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rabbitonweb/rchain/downloads","issues_url":"https://api.github.com/repos/rabbitonweb/rchain/issues{/number}","pulls_url":"https://api.github.com/repos/rabbitonweb/rchain/pulls{/number}","milestones_url":"https://api.github.com/repos/rabbitonweb/rchain/milestones{/number}","notifications_url":"https://api.github.com/repos/rabbitonweb/rchain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rabbitonweb/rchain/labels{/name}","releases_url":"https://api.github.com/repos/rabbitonweb/rchain/releases{/id}","deployments_url":"https://api.github.com/repos/rabbitonweb/rchain/deployments","created_at":"2018-02-05T09:37:18Z","updated_at":"2018-02-05T09:37:21Z","pushed_at":"2018-07-24T13:51:50Z","git_url":"git://github.com/rabbitonweb/rchain.git","ssh_url":"git@github.com:rabbitonweb/rchain.git","clone_url":"https://github.com/rabbitonweb/rchain.git","svn_url":"https://github.com/rabbitonweb/rchain","homepage":null,"size":13250,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rchain:dev","ref":"dev","sha":"e511afdd82ea12c64e9ac7f814a8ef0157ec8e82","user":{"login":"rchain","id":20671765,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNjcxNzY1","avatar_url":"https://avatars0.githubusercontent.com/u/20671765?v=4","gravatar_id":"","url":"https://api.github.com/users/rchain","html_url":"https://github.com/rchain","followers_url":"https://api.github.com/users/rchain/followers","following_url":"https://api.github.com/users/rchain/following{/other_user}","gists_url":"https://api.github.com/users/rchain/gists{/gist_id}","starred_url":"https://api.github.com/users/rchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchain/subscriptions","organizations_url":"https://api.github.com/users/rchain/orgs","repos_url":"https://api.github.com/users/rchain/repos","events_url":"https://api.github.com/users/rchain/events{/privacy}","received_events_url":"https://api.github.com/users/rchain/received_events","type":"Organization","site_admin":false},"repo":{"id":84493691,"node_id":"MDEwOlJlcG9zaXRvcnk4NDQ5MzY5MQ==","name":"rchain","full_name":"rchain/rchain","owner":{"login":"rchain","id":20671765,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNjcxNzY1","avatar_url":"https://avatars0.githubusercontent.com/u/20671765?v=4","gravatar_id":"","url":"https://api.github.com/users/rchain","html_url":"https://github.com/rchain","followers_url":"https://api.github.com/users/rchain/followers","following_url":"https://api.github.com/users/rchain/following{/other_user}","gists_url":"https://api.github.com/users/rchain/gists{/gist_id}","starred_url":"https://api.github.com/users/rchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchain/subscriptions","organizations_url":"https://api.github.com/users/rchain/orgs","repos_url":"https://api.github.com/users/rchain/repos","events_url":"https://api.github.com/users/rchain/events{/privacy}","received_events_url":"https://api.github.com/users/rchain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rchain/rchain","description":null,"fork":false,"url":"https://api.github.com/repos/rchain/rchain","forks_url":"https://api.github.com/repos/rchain/rchain/forks","keys_url":"https://api.github.com/repos/rchain/rchain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rchain/rchain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rchain/rchain/teams","hooks_url":"https://api.github.com/repos/rchain/rchain/hooks","issue_events_url":"https://api.github.com/repos/rchain/rchain/issues/events{/number}","events_url":"https://api.github.com/repos/rchain/rchain/events","assignees_url":"https://api.github.com/repos/rchain/rchain/assignees{/user}","branches_url":"https://api.github.com/repos/rchain/rchain/branches{/branch}","tags_url":"https://api.github.com/repos/rchain/rchain/tags","blobs_url":"https://api.github.com/repos/rchain/rchain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rchain/rchain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rchain/rchain/git/refs{/sha}","trees_url":"https://api.github.com/repos/rchain/rchain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rchain/rchain/statuses/{sha}","languages_url":"https://api.github.com/repos/rchain/rchain/languages","stargazers_url":"https://api.github.com/repos/rchain/rchain/stargazers","contributors_url":"https://api.github.com/repos/rchain/rchain/contributors","subscribers_url":"https://api.github.com/repos/rchain/rchain/subscribers","subscription_url":"https://api.github.com/repos/rchain/rchain/subscription","commits_url":"https://api.github.com/repos/rchain/rchain/commits{/sha}","git_commits_url":"https://api.github.com/repos/rchain/rchain/git/commits{/sha}","comments_url":"https://api.github.com/repos/rchain/rchain/comments{/number}","issue_comment_url":"https://api.github.com/repos/rchain/rchain/issues/comments{/number}","contents_url":"https://api.github.com/repos/rchain/rchain/contents/{+path}","compare_url":"https://api.github.com/repos/rchain/rchain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rchain/rchain/merges","archive_url":"https://api.github.com/repos/rchain/rchain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rchain/rchain/downloads","issues_url":"https://api.github.com/repos/rchain/rchain/issues{/number}","pulls_url":"https://api.github.com/repos/rchain/rchain/pulls{/number}","milestones_url":"https://api.github.com/repos/rchain/rchain/milestones{/number}","notifications_url":"https://api.github.com/repos/rchain/rchain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rchain/rchain/labels{/name}","releases_url":"https://api.github.com/repos/rchain/rchain/releases{/id}","deployments_url":"https://api.github.com/repos/rchain/rchain/deployments","created_at":"2017-03-09T22:15:35Z","updated_at":"2018-07-23T21:29:24Z","pushed_at":"2018-07-24T14:36:27Z","git_url":"git://github.com/rchain/rchain.git","ssh_url":"git@github.com:rchain/rchain.git","clone_url":"https://github.com/rchain/rchain.git","svn_url":"https://github.com/rchain/rchain","homepage":null,"size":13296,"stargazers_count":375,"watchers_count":375,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":108,"open_issues":9,"watchers":375,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rchain/rchain/pulls/1168"},"html":{"href":"https://github.com/rchain/rchain/pull/1168"},"issue":{"href":"https://api.github.com/repos/rchain/rchain/issues/1168"},"comments":{"href":"https://api.github.com/repos/rchain/rchain/issues/1168/comments"},"review_comments":{"href":"https://api.github.com/repos/rchain/rchain/pulls/1168/comments"},"review_comment":{"href":"https://api.github.com/repos/rchain/rchain/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rchain/rchain/pulls/1168/commits"},"statuses":{"href":"https://api.github.com/repos/rchain/rchain/statuses/fb3b6484363c54bb1cac22e8846a0a501742ac18"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"rabbitonweb","id":6287558,"node_id":"MDQ6VXNlcjYyODc1NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/6287558?v=4","gravatar_id":"","url":"https://api.github.com/users/rabbitonweb","html_url":"https://github.com/rabbitonweb","followers_url":"https://api.github.com/users/rabbitonweb/followers","following_url":"https://api.github.com/users/rabbitonweb/following{/other_user}","gists_url":"https://api.github.com/users/rabbitonweb/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitonweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitonweb/subscriptions","organizations_url":"https://api.github.com/users/rabbitonweb/orgs","repos_url":"https://api.github.com/users/rabbitonweb/repos","events_url":"https://api.github.com/users/rabbitonweb/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitonweb/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":89,"deletions":80,"changed_files":1}}
{"actor":{"display_login":"rabbitonweb"}}