{"action":"created","comment":{"url":"https://api.github.com/repos/emil-e/rapidcheck/pulls/comments/48342185","id":48342185,"diff_hunk":"@@ -0,0 +1,67 @@\n+Parallel testing\n+=========================\n+Standard RapidCheck stateful testing can be used to find bugs that occur as a result of single threaded interaction with the system under test. However, another very common class of bugs are race conditions which by definition only appear when more than one thread is involved. RapidCheck can provoke race conditions in stateful tests by executing a subset of the commands in a command sequence in parallel. A parallel test is conseridered successful if there is a possible interleaving of the commands in the test that can explain the result of the execution.\n+\n+## The anatomy of a parallel test ##\n+The execution of a parallel test case can be divided into four phases: command generation, pre-condition verification, execution and verification. \n+\n+During command generation three distinct command sequences are generated: the prefix, the left branch and the right branch. The prefix will be executed first, followed by the left and right branches that are executed in parallel. The exact order in which the commands in the left and right branches will be executed is not known to RapidCheck. This makes pre-condition verification more strict than in the sequential case as pre-condition verification for each test case has to be done for all possible command interleavings. The test case is discarded if any failing pre-condition is found.\n+\n+After pre-condition verification comes the execution. As explained earlier RapidCheck first executes the prefix, followed by concurrently executing the left and right branches in different threads. Once the execution is completed, RapidCheck checks if there exists at least one valid (linearized) command interleaving. A valid command interleaving is a possible ordering of commands for which there are no failing assertions when the validation functions that were returned from the ```run``` function of each command in the sequence are invoked sequentially.","path":"doc/parallel.md","position":10,"original_position":10,"commit_id":"fee6f21b5c2e777a24dbeda1b1164427e2b429f1","original_commit_id":"fee6f21b5c2e777a24dbeda1b1164427e2b429f1","user":{"login":"emil-e","id":5737870,"avatar_url":"https://avatars.githubusercontent.com/u/5737870?v=3","gravatar_id":"","url":"https://api.github.com/users/emil-e","html_url":"https://github.com/emil-e","followers_url":"https://api.github.com/users/emil-e/followers","following_url":"https://api.github.com/users/emil-e/following{/other_user}","gists_url":"https://api.github.com/users/emil-e/gists{/gist_id}","starred_url":"https://api.github.com/users/emil-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emil-e/subscriptions","organizations_url":"https://api.github.com/users/emil-e/orgs","repos_url":"https://api.github.com/users/emil-e/repos","events_url":"https://api.github.com/users/emil-e/events{/privacy}","received_events_url":"https://api.github.com/users/emil-e/received_events","type":"User","site_admin":false},"body":"This one is tricky to understand if you're not used to thinking about models and systems under test... but I don't really know how to make it simple. Maybe we just have to leave it at that... if you want to understand this stuff, you'll have to think a bit. I'm hoping people can use it without understanding, though.","created_at":"2015-12-23T12:46:42Z","updated_at":"2015-12-23T12:46:42Z","html_url":"https://github.com/emil-e/rapidcheck/pull/62#discussion_r48342185","pull_request_url":"https://api.github.com/repos/emil-e/rapidcheck/pulls/62","_links":{"self":{"href":"https://api.github.com/repos/emil-e/rapidcheck/pulls/comments/48342185"},"html":{"href":"https://github.com/emil-e/rapidcheck/pull/62#discussion_r48342185"},"pull_request":{"href":"https://api.github.com/repos/emil-e/rapidcheck/pulls/62"}}},"pull_request":{"url":"https://api.github.com/repos/emil-e/rapidcheck/pulls/62","id":43251545,"html_url":"https://github.com/emil-e/rapidcheck/pull/62","diff_url":"https://github.com/emil-e/rapidcheck/pull/62.diff","patch_url":"https://github.com/emil-e/rapidcheck/pull/62.patch","issue_url":"https://api.github.com/repos/emil-e/rapidcheck/issues/62","number":62,"state":"open","locked":false,"title":"Parallel testing","user":{"login":"emil-e","id":5737870,"avatar_url":"https://avatars.githubusercontent.com/u/5737870?v=3","gravatar_id":"","url":"https://api.github.com/users/emil-e","html_url":"https://github.com/emil-e","followers_url":"https://api.github.com/users/emil-e/followers","following_url":"https://api.github.com/users/emil-e/following{/other_user}","gists_url":"https://api.github.com/users/emil-e/gists{/gist_id}","starred_url":"https://api.github.com/users/emil-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emil-e/subscriptions","organizations_url":"https://api.github.com/users/emil-e/orgs","repos_url":"https://api.github.com/users/emil-e/repos","events_url":"https://api.github.com/users/emil-e/events{/privacy}","received_events_url":"https://api.github.com/users/emil-e/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-25T05:43:39Z","updated_at":"2015-12-23T12:46:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a797d23a9703eeeda3c768958b9bb7f1e849064","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/emil-e/rapidcheck/pulls/62/commits","review_comments_url":"https://api.github.com/repos/emil-e/rapidcheck/pulls/62/comments","review_comment_url":"https://api.github.com/repos/emil-e/rapidcheck/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emil-e/rapidcheck/issues/62/comments","statuses_url":"https://api.github.com/repos/emil-e/rapidcheck/statuses/fee6f21b5c2e777a24dbeda1b1164427e2b429f1","head":{"label":"furuholm:parallel_testing","ref":"parallel_testing","sha":"fee6f21b5c2e777a24dbeda1b1164427e2b429f1","user":{"login":"furuholm","id":977970,"avatar_url":"https://avatars.githubusercontent.com/u/977970?v=3","gravatar_id":"","url":"https://api.github.com/users/furuholm","html_url":"https://github.com/furuholm","followers_url":"https://api.github.com/users/furuholm/followers","following_url":"https://api.github.com/users/furuholm/following{/other_user}","gists_url":"https://api.github.com/users/furuholm/gists{/gist_id}","starred_url":"https://api.github.com/users/furuholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furuholm/subscriptions","organizations_url":"https://api.github.com/users/furuholm/orgs","repos_url":"https://api.github.com/users/furuholm/repos","events_url":"https://api.github.com/users/furuholm/events{/privacy}","received_events_url":"https://api.github.com/users/furuholm/received_events","type":"User","site_admin":false},"repo":{"id":32100169,"name":"rapidcheck","full_name":"furuholm/rapidcheck","owner":{"login":"furuholm","id":977970,"avatar_url":"https://avatars.githubusercontent.com/u/977970?v=3","gravatar_id":"","url":"https://api.github.com/users/furuholm","html_url":"https://github.com/furuholm","followers_url":"https://api.github.com/users/furuholm/followers","following_url":"https://api.github.com/users/furuholm/following{/other_user}","gists_url":"https://api.github.com/users/furuholm/gists{/gist_id}","starred_url":"https://api.github.com/users/furuholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furuholm/subscriptions","organizations_url":"https://api.github.com/users/furuholm/orgs","repos_url":"https://api.github.com/users/furuholm/repos","events_url":"https://api.github.com/users/furuholm/events{/privacy}","received_events_url":"https://api.github.com/users/furuholm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/furuholm/rapidcheck","description":"QuickCheck clone for C++ with the goal of being simple to use with as little boilerplate as possible.","fork":true,"url":"https://api.github.com/repos/furuholm/rapidcheck","forks_url":"https://api.github.com/repos/furuholm/rapidcheck/forks","keys_url":"https://api.github.com/repos/furuholm/rapidcheck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/furuholm/rapidcheck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/furuholm/rapidcheck/teams","hooks_url":"https://api.github.com/repos/furuholm/rapidcheck/hooks","issue_events_url":"https://api.github.com/repos/furuholm/rapidcheck/issues/events{/number}","events_url":"https://api.github.com/repos/furuholm/rapidcheck/events","assignees_url":"https://api.github.com/repos/furuholm/rapidcheck/assignees{/user}","branches_url":"https://api.github.com/repos/furuholm/rapidcheck/branches{/branch}","tags_url":"https://api.github.com/repos/furuholm/rapidcheck/tags","blobs_url":"https://api.github.com/repos/furuholm/rapidcheck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/furuholm/rapidcheck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/furuholm/rapidcheck/git/refs{/sha}","trees_url":"https://api.github.com/repos/furuholm/rapidcheck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/furuholm/rapidcheck/statuses/{sha}","languages_url":"https://api.github.com/repos/furuholm/rapidcheck/languages","stargazers_url":"https://api.github.com/repos/furuholm/rapidcheck/stargazers","contributors_url":"https://api.github.com/repos/furuholm/rapidcheck/contributors","subscribers_url":"https://api.github.com/repos/furuholm/rapidcheck/subscribers","subscription_url":"https://api.github.com/repos/furuholm/rapidcheck/subscription","commits_url":"https://api.github.com/repos/furuholm/rapidcheck/commits{/sha}","git_commits_url":"https://api.github.com/repos/furuholm/rapidcheck/git/commits{/sha}","comments_url":"https://api.github.com/repos/furuholm/rapidcheck/comments{/number}","issue_comment_url":"https://api.github.com/repos/furuholm/rapidcheck/issues/comments{/number}","contents_url":"https://api.github.com/repos/furuholm/rapidcheck/contents/{+path}","compare_url":"https://api.github.com/repos/furuholm/rapidcheck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/furuholm/rapidcheck/merges","archive_url":"https://api.github.com/repos/furuholm/rapidcheck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/furuholm/rapidcheck/downloads","issues_url":"https://api.github.com/repos/furuholm/rapidcheck/issues{/number}","pulls_url":"https://api.github.com/repos/furuholm/rapidcheck/pulls{/number}","milestones_url":"https://api.github.com/repos/furuholm/rapidcheck/milestones{/number}","notifications_url":"https://api.github.com/repos/furuholm/rapidcheck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/furuholm/rapidcheck/labels{/name}","releases_url":"https://api.github.com/repos/furuholm/rapidcheck/releases{/id}","created_at":"2015-03-12T20:19:28Z","updated_at":"2015-03-12T20:19:28Z","pushed_at":"2015-12-02T21:43:48Z","git_url":"git://github.com/furuholm/rapidcheck.git","ssh_url":"git@github.com:furuholm/rapidcheck.git","clone_url":"https://github.com/furuholm/rapidcheck.git","svn_url":"https://github.com/furuholm/rapidcheck","homepage":null,"size":1495,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"emil-e:master","ref":"master","sha":"593ada72f6938221973bf30bf7a7f7e6a24160de","user":{"login":"emil-e","id":5737870,"avatar_url":"https://avatars.githubusercontent.com/u/5737870?v=3","gravatar_id":"","url":"https://api.github.com/users/emil-e","html_url":"https://github.com/emil-e","followers_url":"https://api.github.com/users/emil-e/followers","following_url":"https://api.github.com/users/emil-e/following{/other_user}","gists_url":"https://api.github.com/users/emil-e/gists{/gist_id}","starred_url":"https://api.github.com/users/emil-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emil-e/subscriptions","organizations_url":"https://api.github.com/users/emil-e/orgs","repos_url":"https://api.github.com/users/emil-e/repos","events_url":"https://api.github.com/users/emil-e/events{/privacy}","received_events_url":"https://api.github.com/users/emil-e/received_events","type":"User","site_admin":false},"repo":{"id":19587527,"name":"rapidcheck","full_name":"emil-e/rapidcheck","owner":{"login":"emil-e","id":5737870,"avatar_url":"https://avatars.githubusercontent.com/u/5737870?v=3","gravatar_id":"","url":"https://api.github.com/users/emil-e","html_url":"https://github.com/emil-e","followers_url":"https://api.github.com/users/emil-e/followers","following_url":"https://api.github.com/users/emil-e/following{/other_user}","gists_url":"https://api.github.com/users/emil-e/gists{/gist_id}","starred_url":"https://api.github.com/users/emil-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emil-e/subscriptions","organizations_url":"https://api.github.com/users/emil-e/orgs","repos_url":"https://api.github.com/users/emil-e/repos","events_url":"https://api.github.com/users/emil-e/events{/privacy}","received_events_url":"https://api.github.com/users/emil-e/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emil-e/rapidcheck","description":"QuickCheck clone for C++ with the goal of being simple to use with as little boilerplate as possible.","fork":false,"url":"https://api.github.com/repos/emil-e/rapidcheck","forks_url":"https://api.github.com/repos/emil-e/rapidcheck/forks","keys_url":"https://api.github.com/repos/emil-e/rapidcheck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emil-e/rapidcheck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emil-e/rapidcheck/teams","hooks_url":"https://api.github.com/repos/emil-e/rapidcheck/hooks","issue_events_url":"https://api.github.com/repos/emil-e/rapidcheck/issues/events{/number}","events_url":"https://api.github.com/repos/emil-e/rapidcheck/events","assignees_url":"https://api.github.com/repos/emil-e/rapidcheck/assignees{/user}","branches_url":"https://api.github.com/repos/emil-e/rapidcheck/branches{/branch}","tags_url":"https://api.github.com/repos/emil-e/rapidcheck/tags","blobs_url":"https://api.github.com/repos/emil-e/rapidcheck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emil-e/rapidcheck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emil-e/rapidcheck/git/refs{/sha}","trees_url":"https://api.github.com/repos/emil-e/rapidcheck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emil-e/rapidcheck/statuses/{sha}","languages_url":"https://api.github.com/repos/emil-e/rapidcheck/languages","stargazers_url":"https://api.github.com/repos/emil-e/rapidcheck/stargazers","contributors_url":"https://api.github.com/repos/emil-e/rapidcheck/contributors","subscribers_url":"https://api.github.com/repos/emil-e/rapidcheck/subscribers","subscription_url":"https://api.github.com/repos/emil-e/rapidcheck/subscription","commits_url":"https://api.github.com/repos/emil-e/rapidcheck/commits{/sha}","git_commits_url":"https://api.github.com/repos/emil-e/rapidcheck/git/commits{/sha}","comments_url":"https://api.github.com/repos/emil-e/rapidcheck/comments{/number}","issue_comment_url":"https://api.github.com/repos/emil-e/rapidcheck/issues/comments{/number}","contents_url":"https://api.github.com/repos/emil-e/rapidcheck/contents/{+path}","compare_url":"https://api.github.com/repos/emil-e/rapidcheck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emil-e/rapidcheck/merges","archive_url":"https://api.github.com/repos/emil-e/rapidcheck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emil-e/rapidcheck/downloads","issues_url":"https://api.github.com/repos/emil-e/rapidcheck/issues{/number}","pulls_url":"https://api.github.com/repos/emil-e/rapidcheck/pulls{/number}","milestones_url":"https://api.github.com/repos/emil-e/rapidcheck/milestones{/number}","notifications_url":"https://api.github.com/repos/emil-e/rapidcheck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emil-e/rapidcheck/labels{/name}","releases_url":"https://api.github.com/repos/emil-e/rapidcheck/releases{/id}","created_at":"2014-05-08T20:19:43Z","updated_at":"2015-12-21T17:59:55Z","pushed_at":"2015-12-21T14:46:35Z","git_url":"git://github.com/emil-e/rapidcheck.git","ssh_url":"git@github.com:emil-e/rapidcheck.git","clone_url":"https://github.com/emil-e/rapidcheck.git","svn_url":"https://github.com/emil-e/rapidcheck","homepage":null,"size":2414,"stargazers_count":125,"watchers_count":125,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":26,"forks":5,"open_issues":26,"watchers":125,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emil-e/rapidcheck/pulls/62"},"html":{"href":"https://github.com/emil-e/rapidcheck/pull/62"},"issue":{"href":"https://api.github.com/repos/emil-e/rapidcheck/issues/62"},"comments":{"href":"https://api.github.com/repos/emil-e/rapidcheck/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/emil-e/rapidcheck/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/emil-e/rapidcheck/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emil-e/rapidcheck/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/emil-e/rapidcheck/statuses/fee6f21b5c2e777a24dbeda1b1164427e2b429f1"}}}}