{"action":"created","comment":{"url":"https://api.github.com/repos/uber/ringpop-common/pulls/comments/55386019","id":55386019,"diff_hunk":"@@ -65,3 +65,34 @@ Install ringpop-go and build the `testpop` executable:\n Run the tests:\n \n \tnode ringpop-common/test/it-tests.js $GOPATH/src/github.com/uber/ringpop-go/testpop\n+\n+# Understanding the integration tests\n+\n+This is a written summary of a one-hour workshop of digging into the integration tests and asking questions from the people who implemented it. As of now, it might be out of date (we will try to keep it up to date though), but the text below can give a good starting point while trying to wrap your head around.\n+\n+## Glossary\n+\n+*Slanted names* mean general concepts, names in `monospace` common variable names.\n+\n+* *SUT*: Subject Under Test.\n+* *testpop*: very basic application using ringpop.\n+* `t`: test object. Instance of `tap`.\n+* `tc`: test coordinator. The thing that runs and controls testpop, SUT and\n+  fake nodes. Handles coordination between the fake and real nodes.\n+* `n` : size of the cluster.\n+* `ns`: list of cluster sizes. Treat it like *plural n* -- *ns*.\n+* `nodeIx`: node index. Any variable that ends with `Ix` is an index variable.\n+* `cb`: callback.\n+\n+## High-level overview\n+\n+Tests are usually composed of a *Real Node* (*SUT*) and a number of fake nodes. The real node is the actual ringpop instance (`testpop`), and the fake nodes are the test harness.\n+\n+The test harness (fake nodes) send messages to the real node, and listen on SUTS sends back. Test harness then asserts whether whatever SUT is sending back matches expectations. With this black-box structure, tests are verifying the node behaves as expected given certain messages, and can be used to achieve feature parity between different ringpop implementations.","path":"test/README.md","position":27,"original_position":27,"commit_id":"aa5f8a2a3b9ee810eac4e7773b240768a02d1d44","original_commit_id":"aa5f8a2a3b9ee810eac4e7773b240768a02d1d44","user":{"login":"CorgiMan","id":2640140,"avatar_url":"https://avatars.githubusercontent.com/u/2640140?v=3","gravatar_id":"","url":"https://api.github.com/users/CorgiMan","html_url":"https://github.com/CorgiMan","followers_url":"https://api.github.com/users/CorgiMan/followers","following_url":"https://api.github.com/users/CorgiMan/following{/other_user}","gists_url":"https://api.github.com/users/CorgiMan/gists{/gist_id}","starred_url":"https://api.github.com/users/CorgiMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorgiMan/subscriptions","organizations_url":"https://api.github.com/users/CorgiMan/orgs","repos_url":"https://api.github.com/users/CorgiMan/repos","events_url":"https://api.github.com/users/CorgiMan/events{/privacy}","received_events_url":"https://api.github.com/users/CorgiMan/received_events","type":"User","site_admin":false},"body":"on 'what' the SUT sends back","created_at":"2016-03-08T16:37:36Z","updated_at":"2016-03-08T16:37:36Z","html_url":"https://github.com/uber/ringpop-common/pull/34#discussion_r55386019","pull_request_url":"https://api.github.com/repos/uber/ringpop-common/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/comments/55386019"},"html":{"href":"https://github.com/uber/ringpop-common/pull/34#discussion_r55386019"},"pull_request":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/uber/ringpop-common/pulls/34","id":62076112,"html_url":"https://github.com/uber/ringpop-common/pull/34","diff_url":"https://github.com/uber/ringpop-common/pull/34.diff","patch_url":"https://github.com/uber/ringpop-common/pull/34.patch","issue_url":"https://api.github.com/repos/uber/ringpop-common/issues/34","number":34,"state":"open","locked":false,"title":"Document workings of integration tests","user":{"login":"Motiejus","id":107720,"avatar_url":"https://avatars.githubusercontent.com/u/107720?v=3","gravatar_id":"","url":"https://api.github.com/users/Motiejus","html_url":"https://github.com/Motiejus","followers_url":"https://api.github.com/users/Motiejus/followers","following_url":"https://api.github.com/users/Motiejus/following{/other_user}","gists_url":"https://api.github.com/users/Motiejus/gists{/gist_id}","starred_url":"https://api.github.com/users/Motiejus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Motiejus/subscriptions","organizations_url":"https://api.github.com/users/Motiejus/orgs","repos_url":"https://api.github.com/users/Motiejus/repos","events_url":"https://api.github.com/users/Motiejus/events{/privacy}","received_events_url":"https://api.github.com/users/Motiejus/received_events","type":"User","site_admin":false},"body":"Did some best-effort scribbling after clarifying the test structure with @CorgiMan .","created_at":"2016-03-08T14:13:57Z","updated_at":"2016-03-08T16:37:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4433c537bd6b7beaf5a2cb65b57190b1542bd8bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/uber/ringpop-common/pulls/34/commits","review_comments_url":"https://api.github.com/repos/uber/ringpop-common/pulls/34/comments","review_comment_url":"https://api.github.com/repos/uber/ringpop-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/ringpop-common/issues/34/comments","statuses_url":"https://api.github.com/repos/uber/ringpop-common/statuses/aa5f8a2a3b9ee810eac4e7773b240768a02d1d44","head":{"label":"uber:motiejus-doc","ref":"motiejus-doc","sha":"aa5f8a2a3b9ee810eac4e7773b240768a02d1d44","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":41671989,"name":"ringpop-common","full_name":"uber/ringpop-common","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/ringpop-common","description":"Cross-language compatible tools and documentation for Ringpop","fork":false,"url":"https://api.github.com/repos/uber/ringpop-common","forks_url":"https://api.github.com/repos/uber/ringpop-common/forks","keys_url":"https://api.github.com/repos/uber/ringpop-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/ringpop-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/ringpop-common/teams","hooks_url":"https://api.github.com/repos/uber/ringpop-common/hooks","issue_events_url":"https://api.github.com/repos/uber/ringpop-common/issues/events{/number}","events_url":"https://api.github.com/repos/uber/ringpop-common/events","assignees_url":"https://api.github.com/repos/uber/ringpop-common/assignees{/user}","branches_url":"https://api.github.com/repos/uber/ringpop-common/branches{/branch}","tags_url":"https://api.github.com/repos/uber/ringpop-common/tags","blobs_url":"https://api.github.com/repos/uber/ringpop-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/ringpop-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/ringpop-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/ringpop-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/ringpop-common/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/ringpop-common/languages","stargazers_url":"https://api.github.com/repos/uber/ringpop-common/stargazers","contributors_url":"https://api.github.com/repos/uber/ringpop-common/contributors","subscribers_url":"https://api.github.com/repos/uber/ringpop-common/subscribers","subscription_url":"https://api.github.com/repos/uber/ringpop-common/subscription","commits_url":"https://api.github.com/repos/uber/ringpop-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/ringpop-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/ringpop-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/ringpop-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/ringpop-common/contents/{+path}","compare_url":"https://api.github.com/repos/uber/ringpop-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/ringpop-common/merges","archive_url":"https://api.github.com/repos/uber/ringpop-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/ringpop-common/downloads","issues_url":"https://api.github.com/repos/uber/ringpop-common/issues{/number}","pulls_url":"https://api.github.com/repos/uber/ringpop-common/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/ringpop-common/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/ringpop-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/ringpop-common/labels{/name}","releases_url":"https://api.github.com/repos/uber/ringpop-common/releases{/id}","deployments_url":"https://api.github.com/repos/uber/ringpop-common/deployments","created_at":"2015-08-31T11:32:45Z","updated_at":"2016-02-23T12:22:42Z","pushed_at":"2016-03-08T14:13:57Z","git_url":"git://github.com/uber/ringpop-common.git","ssh_url":"git@github.com:uber/ringpop-common.git","clone_url":"https://github.com/uber/ringpop-common.git","svn_url":"https://github.com/uber/ringpop-common","homepage":"http://uber.github.io/ringpop/","size":200,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"uber:master","ref":"master","sha":"473e004662c65151fbc8210b3bd5228dafad4e7e","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":41671989,"name":"ringpop-common","full_name":"uber/ringpop-common","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/ringpop-common","description":"Cross-language compatible tools and documentation for Ringpop","fork":false,"url":"https://api.github.com/repos/uber/ringpop-common","forks_url":"https://api.github.com/repos/uber/ringpop-common/forks","keys_url":"https://api.github.com/repos/uber/ringpop-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/ringpop-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/ringpop-common/teams","hooks_url":"https://api.github.com/repos/uber/ringpop-common/hooks","issue_events_url":"https://api.github.com/repos/uber/ringpop-common/issues/events{/number}","events_url":"https://api.github.com/repos/uber/ringpop-common/events","assignees_url":"https://api.github.com/repos/uber/ringpop-common/assignees{/user}","branches_url":"https://api.github.com/repos/uber/ringpop-common/branches{/branch}","tags_url":"https://api.github.com/repos/uber/ringpop-common/tags","blobs_url":"https://api.github.com/repos/uber/ringpop-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/ringpop-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/ringpop-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/ringpop-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/ringpop-common/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/ringpop-common/languages","stargazers_url":"https://api.github.com/repos/uber/ringpop-common/stargazers","contributors_url":"https://api.github.com/repos/uber/ringpop-common/contributors","subscribers_url":"https://api.github.com/repos/uber/ringpop-common/subscribers","subscription_url":"https://api.github.com/repos/uber/ringpop-common/subscription","commits_url":"https://api.github.com/repos/uber/ringpop-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/ringpop-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/ringpop-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/ringpop-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/ringpop-common/contents/{+path}","compare_url":"https://api.github.com/repos/uber/ringpop-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/ringpop-common/merges","archive_url":"https://api.github.com/repos/uber/ringpop-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/ringpop-common/downloads","issues_url":"https://api.github.com/repos/uber/ringpop-common/issues{/number}","pulls_url":"https://api.github.com/repos/uber/ringpop-common/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/ringpop-common/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/ringpop-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/ringpop-common/labels{/name}","releases_url":"https://api.github.com/repos/uber/ringpop-common/releases{/id}","deployments_url":"https://api.github.com/repos/uber/ringpop-common/deployments","created_at":"2015-08-31T11:32:45Z","updated_at":"2016-02-23T12:22:42Z","pushed_at":"2016-03-08T14:13:57Z","git_url":"git://github.com/uber/ringpop-common.git","ssh_url":"git@github.com:uber/ringpop-common.git","clone_url":"https://github.com/uber/ringpop-common.git","svn_url":"https://github.com/uber/ringpop-common","homepage":"http://uber.github.io/ringpop/","size":200,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/34"},"html":{"href":"https://github.com/uber/ringpop-common/pull/34"},"issue":{"href":"https://api.github.com/repos/uber/ringpop-common/issues/34"},"comments":{"href":"https://api.github.com/repos/uber/ringpop-common/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/uber/ringpop-common/statuses/aa5f8a2a3b9ee810eac4e7773b240768a02d1d44"}}}}