{"action":"created","comment":{"url":"https://api.github.com/repos/esl/MongooseIM/pulls/comments/81116591","pull_request_review_id":2119513,"id":81116591,"diff_hunk":"@@ -0,0 +1,184 @@\n+-module(bosh_interleave_reqs).\n+\n+-behaviour(proper_statem).\n+\n+-include_lib(\"proper/include/proper.hrl\").\n+% -include_lib(\"eqc/include/eqc_statem.hrl\").\n+% -include_lib(\"eqc/include/eqc.hrl\").\n+-include_lib(\"escalus/include/escalus.hrl\").\n+-include_lib(\"exml/include/exml.hrl\").\n+\n+-export([test/1, sample/0, prop/1]).\n+\n+-export([initial_state/1, command/1, precondition/2, postcondition/3,\n+\t\t next_state/3]).\n+\n+-export([read_config/1,\n+         connect_carol/1,\n+         connect_geralt/1,\n+         send_from_carol/2,\n+         send_from_geralt/2,\n+         wait_for_msgs_carol/2,\n+         wait_for_msgs_geralt/2]).\n+\n+-export([ct_config_giver/1]).\n+\n+-record(state, {carol,\n+\t\t\t\tgeralt,\n+                msgs_to_carol,\n+                msgs_to_geralt,\n+                config_pid}).\n+\n+test(Config) ->\n+    proper:quickcheck(?MODULE:prop(Config)).\n+\n+sample() ->\n+    proper_gen:pick(commands(?MODULE)).\n+\n+prop(Config) ->\n+    Pid = spawn_link(?MODULE, ct_config_giver, [Config]),\n+\t?FORALL(Cmds, commands(?MODULE, initial_state(Pid)),\n+\t\t\t?TRAPEXIT(\n+\t\t\t   begin\n+\t\t\t\t   {History,State,Result} = run_commands(?MODULE, Cmds),","path":"test/ejabberd_tests/tests/bosh_interleave_reqs.erl","position":43,"original_position":43,"commit_id":"1e8cf1d7c6ae910ef94bcbe7d9d6096f3795878d","original_commit_id":"1e8cf1d7c6ae910ef94bcbe7d9d6096f3795878d","user":{"login":"gadgetci","id":10134338,"avatar_url":"https://avatars.githubusercontent.com/u/10134338?v=3","gravatar_id":"","url":"https://api.github.com/users/gadgetci","html_url":"https://github.com/gadgetci","followers_url":"https://api.github.com/users/gadgetci/followers","following_url":"https://api.github.com/users/gadgetci/following{/other_user}","gists_url":"https://api.github.com/users/gadgetci/gists{/gist_id}","starred_url":"https://api.github.com/users/gadgetci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gadgetci/subscriptions","organizations_url":"https://api.github.com/users/gadgetci/orgs","repos_url":"https://api.github.com/users/gadgetci/repos","events_url":"https://api.github.com/users/gadgetci/events{/privacy}","received_events_url":"https://api.github.com/users/gadgetci/received_events","type":"User","site_admin":false},"body":"According to **Elvis**:\n> Line 43 has a tab at column 0.","created_at":"2016-09-29T11:33:25Z","updated_at":"2016-09-29T11:33:26Z","html_url":"https://github.com/esl/MongooseIM/pull/869#discussion_r81116591","pull_request_url":"https://api.github.com/repos/esl/MongooseIM/pulls/869","_links":{"self":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/comments/81116591"},"html":{"href":"https://github.com/esl/MongooseIM/pull/869#discussion_r81116591"},"pull_request":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/869"}}},"pull_request":{"url":"https://api.github.com/repos/esl/MongooseIM/pulls/869","id":74918722,"html_url":"https://github.com/esl/MongooseIM/pull/869","diff_url":"https://github.com/esl/MongooseIM/pull/869.diff","patch_url":"https://github.com/esl/MongooseIM/pull/869.patch","issue_url":"https://api.github.com/repos/esl/MongooseIM/issues/869","number":869,"state":"open","locked":false,"title":"Hunt BOSH interleave requests issue","user":{"login":"michalwski","id":705828,"avatar_url":"https://avatars.githubusercontent.com/u/705828?v=3","gravatar_id":"","url":"https://api.github.com/users/michalwski","html_url":"https://github.com/michalwski","followers_url":"https://api.github.com/users/michalwski/followers","following_url":"https://api.github.com/users/michalwski/following{/other_user}","gists_url":"https://api.github.com/users/michalwski/gists{/gist_id}","starred_url":"https://api.github.com/users/michalwski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalwski/subscriptions","organizations_url":"https://api.github.com/users/michalwski/orgs","repos_url":"https://api.github.com/users/michalwski/repos","events_url":"https://api.github.com/users/michalwski/events{/privacy}","received_events_url":"https://api.github.com/users/michalwski/received_events","type":"User","site_admin":false},"body":"Proposed changes include:\r\n* fix for wrong deferred `rid` processing when there was a response delivered to the hendler which send bigger `rid` then expected\r\n* fix for missing `xmlns:stream` attr in `<body>` when stream features arrives in their own message\r\n* PopEr tests for message sending/receiving over BOSH\r\n\r\nDetailed description of the deferred rids processing.\r\n\r\nAssume expected `rid` has value `X`\r\nThis bug happens when MongooseIM processes a request with `rid` `X+1` before `X` **and** there is a pending response to the client. In this situation Mongoose puts the request into deferred list which is expected. Also it sends the pending response to the client using this deferred connection which  results in adding the `X+1` `rid` to cached responses list (used to track retransmissions). Later when the deferred `rid` `X+1` is process because the prev arrived, MongooseIM treats it as a retransmission (because the `rid` `X+1` is on the cached responses list). Because of that the main `rid` is not updated correctly and expects `X+1` whereas it should expect now `X+2`. As a result the end the session is terminated upon receiving `rid` `X+3`","created_at":"2016-06-23T09:01:46Z","updated_at":"2016-09-29T11:33:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78ac84c7b5c0eaeff7a8226acf69e5d389909f27","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/esl/MongooseIM/pulls/869/commits","review_comments_url":"https://api.github.com/repos/esl/MongooseIM/pulls/869/comments","review_comment_url":"https://api.github.com/repos/esl/MongooseIM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/esl/MongooseIM/issues/869/comments","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/1e8cf1d7c6ae910ef94bcbe7d9d6096f3795878d","head":{"label":"esl:hunt-bosh-interleave-requests-issue","ref":"hunt-bosh-interleave-requests-issue","sha":"1e8cf1d7c6ae910ef94bcbe7d9d6096f3795878d","user":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"repo":{"id":2354240,"name":"MongooseIM","full_name":"esl/MongooseIM","owner":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/esl/MongooseIM","description":"Jabber / XMPP server with focus on performance and scalability, by Erlang Solutions","fork":false,"url":"https://api.github.com/repos/esl/MongooseIM","forks_url":"https://api.github.com/repos/esl/MongooseIM/forks","keys_url":"https://api.github.com/repos/esl/MongooseIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/MongooseIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/MongooseIM/teams","hooks_url":"https://api.github.com/repos/esl/MongooseIM/hooks","issue_events_url":"https://api.github.com/repos/esl/MongooseIM/issues/events{/number}","events_url":"https://api.github.com/repos/esl/MongooseIM/events","assignees_url":"https://api.github.com/repos/esl/MongooseIM/assignees{/user}","branches_url":"https://api.github.com/repos/esl/MongooseIM/branches{/branch}","tags_url":"https://api.github.com/repos/esl/MongooseIM/tags","blobs_url":"https://api.github.com/repos/esl/MongooseIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/MongooseIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/MongooseIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/MongooseIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/MongooseIM/languages","stargazers_url":"https://api.github.com/repos/esl/MongooseIM/stargazers","contributors_url":"https://api.github.com/repos/esl/MongooseIM/contributors","subscribers_url":"https://api.github.com/repos/esl/MongooseIM/subscribers","subscription_url":"https://api.github.com/repos/esl/MongooseIM/subscription","commits_url":"https://api.github.com/repos/esl/MongooseIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/MongooseIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/MongooseIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/MongooseIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/MongooseIM/contents/{+path}","compare_url":"https://api.github.com/repos/esl/MongooseIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/MongooseIM/merges","archive_url":"https://api.github.com/repos/esl/MongooseIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/MongooseIM/downloads","issues_url":"https://api.github.com/repos/esl/MongooseIM/issues{/number}","pulls_url":"https://api.github.com/repos/esl/MongooseIM/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/MongooseIM/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/MongooseIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/MongooseIM/labels{/name}","releases_url":"https://api.github.com/repos/esl/MongooseIM/releases{/id}","deployments_url":"https://api.github.com/repos/esl/MongooseIM/deployments","created_at":"2011-09-09T08:19:18Z","updated_at":"2016-09-28T12:17:14Z","pushed_at":"2016-09-29T11:33:16Z","git_url":"git://github.com/esl/MongooseIM.git","ssh_url":"git@github.com:esl/MongooseIM.git","clone_url":"https://github.com/esl/MongooseIM.git","svn_url":"https://github.com/esl/MongooseIM","homepage":"https://www.erlang-solutions.com/products/mongooseim.html","size":32210,"stargazers_count":574,"watchers_count":574,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":234,"mirror_url":null,"open_issues_count":93,"forks":234,"open_issues":93,"watchers":574,"default_branch":"master"}},"base":{"label":"esl:master","ref":"master","sha":"abcd1b0fed12f19d01123dcef3b4eed0c46931ea","user":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"repo":{"id":2354240,"name":"MongooseIM","full_name":"esl/MongooseIM","owner":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/esl/MongooseIM","description":"Jabber / XMPP server with focus on performance and scalability, by Erlang Solutions","fork":false,"url":"https://api.github.com/repos/esl/MongooseIM","forks_url":"https://api.github.com/repos/esl/MongooseIM/forks","keys_url":"https://api.github.com/repos/esl/MongooseIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/MongooseIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/MongooseIM/teams","hooks_url":"https://api.github.com/repos/esl/MongooseIM/hooks","issue_events_url":"https://api.github.com/repos/esl/MongooseIM/issues/events{/number}","events_url":"https://api.github.com/repos/esl/MongooseIM/events","assignees_url":"https://api.github.com/repos/esl/MongooseIM/assignees{/user}","branches_url":"https://api.github.com/repos/esl/MongooseIM/branches{/branch}","tags_url":"https://api.github.com/repos/esl/MongooseIM/tags","blobs_url":"https://api.github.com/repos/esl/MongooseIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/MongooseIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/MongooseIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/MongooseIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/MongooseIM/languages","stargazers_url":"https://api.github.com/repos/esl/MongooseIM/stargazers","contributors_url":"https://api.github.com/repos/esl/MongooseIM/contributors","subscribers_url":"https://api.github.com/repos/esl/MongooseIM/subscribers","subscription_url":"https://api.github.com/repos/esl/MongooseIM/subscription","commits_url":"https://api.github.com/repos/esl/MongooseIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/MongooseIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/MongooseIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/MongooseIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/MongooseIM/contents/{+path}","compare_url":"https://api.github.com/repos/esl/MongooseIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/MongooseIM/merges","archive_url":"https://api.github.com/repos/esl/MongooseIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/MongooseIM/downloads","issues_url":"https://api.github.com/repos/esl/MongooseIM/issues{/number}","pulls_url":"https://api.github.com/repos/esl/MongooseIM/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/MongooseIM/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/MongooseIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/MongooseIM/labels{/name}","releases_url":"https://api.github.com/repos/esl/MongooseIM/releases{/id}","deployments_url":"https://api.github.com/repos/esl/MongooseIM/deployments","created_at":"2011-09-09T08:19:18Z","updated_at":"2016-09-28T12:17:14Z","pushed_at":"2016-09-29T11:33:16Z","git_url":"git://github.com/esl/MongooseIM.git","ssh_url":"git@github.com:esl/MongooseIM.git","clone_url":"https://github.com/esl/MongooseIM.git","svn_url":"https://github.com/esl/MongooseIM","homepage":"https://www.erlang-solutions.com/products/mongooseim.html","size":32210,"stargazers_count":574,"watchers_count":574,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":234,"mirror_url":null,"open_issues_count":93,"forks":234,"open_issues":93,"watchers":574,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/869"},"html":{"href":"https://github.com/esl/MongooseIM/pull/869"},"issue":{"href":"https://api.github.com/repos/esl/MongooseIM/issues/869"},"comments":{"href":"https://api.github.com/repos/esl/MongooseIM/issues/869/comments"},"review_comments":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/869/comments"},"review_comment":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/869/commits"},"statuses":{"href":"https://api.github.com/repos/esl/MongooseIM/statuses/1e8cf1d7c6ae910ef94bcbe7d9d6096f3795878d"}}}}
{"actor":{"display_login":"gadgetci"}}