{"action":"created","comment":{"url":"https://api.github.com/repos/gemini-testing/gemini/pulls/comments/45103654","id":45103654,"diff_hunk":"@@ -101,5 +132,132 @@ describe('runner', function() {\n                 assert.callOrder(begin, end);\n             });\n         });\n+\n+        describe('retries', function() {\n+            function mkRetryCandidate_() {\n+                return {\n+                    browserId: 'id',\n+                    suite: {fullName: 'default_name'},\n+                    equal: false\n+                };\n+            }\n+\n+            beforeEach(function() {\n+                config.forBrowser.returns({retry: Infinity});\n+            });\n+\n+            it('should try to submit processed capture for retry', function() {\n+                return run_()\n+                    .then(function() {\n+                        return testSessionRunner.emitAndWait('captureData');\n+                    })\n+                    .then(function() {\n+                        assert.called(FailCollector.prototype.tryToSubmitCapture);\n+                    });\n+            });\n+\n+            it('should emit processed capture event if capture was not submitted for retry', function() {\n+                var onProcessedCapture = sandbox.spy();\n+\n+                runner.on('onCaptureProcessed', onProcessedCapture);\n+\n+                return run_()\n+                    .then(function() {\n+                        return testSessionRunner.emitAndWait('captureData');\n+                    })\n+                    .then(function() {\n+                        assert.called(onProcessedCapture);\n+                    });\n+            });\n+\n+            it('should try to submit non-critical error for retry', function() {\n+                return run_()\n+                    .then(function() {\n+                        return testSessionRunner.emitAndWait('err');\n+                    })\n+                    .then(function() {\n+                        assert.called(FailCollector.prototype.tryToSubmitError);\n+                    });\n+            });\n+\n+            it('should emit `err` event if non-critical error was not submit for retry', function() {\n+                var onErr = sandbox.spy();\n+\n+                runner.on('err', onErr);\n+                return run_()\n+                    .then(function() {\n+                        return testSessionRunner.emitAndWait('err');\n+                    })\n+                    .then(function() {\n+                        assert.called(onErr);\n+                    });\n+            });\n+\n+            it('should try to submit critical error for retry', function() {\n+                return run_()\n+                    .then(function() {\n+                        return testSessionRunner.emitAndWait('criticalError');\n+                    })\n+                    .fail(function() { //promise rejected if failed to submit critical for retry\n+                        assert.called(FailCollector.prototype.tryToSubmitError);\n+                    });\n+            });\n+\n+            it('should emit `err` event before failing on critical error', function() {\n+                var onErr = sandbox.spy();\n+\n+                runner.on('err', onErr);\n+                return run_()\n+                    .then(function() {\n+                        return testSessionRunner.emitAndWait('err');\n+                    })\n+                    .fail(function() {\n+                        assert.called(onErr);\n+                    });\n+            });\n+\n+            it('should reject promise if critical error was not submitted for retry', function() {\n+                return assert.isRejected(run_().then(function() {\n+                    return testSessionRunner.emitAndWait('criticalError');\n+                }));\n+            });\n+\n+            describe('`retry` event', function() {\n+                beforeEach(function() {\n+                    FailCollector.prototype.tryToSubmitCapture.restore();\n+                    FailCollector.prototype.tryToSubmitError.restore();","path":"test/unit/runner/index.test.js","position":154,"original_position":154,"commit_id":"a0d9d8c5e90dc465bf6bd0cd0c38e4f458c1286b","original_commit_id":"91a7a77b77276bea5888ec23e995312a9a7ad1e7","user":{"login":"SwinX","id":854899,"avatar_url":"https://avatars.githubusercontent.com/u/854899?v=3","gravatar_id":"","url":"https://api.github.com/users/SwinX","html_url":"https://github.com/SwinX","followers_url":"https://api.github.com/users/SwinX/followers","following_url":"https://api.github.com/users/SwinX/following{/other_user}","gists_url":"https://api.github.com/users/SwinX/gists{/gist_id}","starred_url":"https://api.github.com/users/SwinX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwinX/subscriptions","organizations_url":"https://api.github.com/users/SwinX/orgs","repos_url":"https://api.github.com/users/SwinX/repos","events_url":"https://api.github.com/users/SwinX/events{/privacy}","received_events_url":"https://api.github.com/users/SwinX/received_events","type":"User","site_admin":false},"body":"Они и так стабаются для каждого теста на самом верху. Просто конкретно этим двум тестом нужно их поведение.","created_at":"2015-11-17T19:03:02Z","updated_at":"2015-11-17T19:03:02Z","html_url":"https://github.com/gemini-testing/gemini/pull/261#discussion_r45103654","pull_request_url":"https://api.github.com/repos/gemini-testing/gemini/pulls/261","_links":{"self":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/comments/45103654"},"html":{"href":"https://github.com/gemini-testing/gemini/pull/261#discussion_r45103654"},"pull_request":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/261"}}},"pull_request":{"url":"https://api.github.com/repos/gemini-testing/gemini/pulls/261","id":47418308,"html_url":"https://github.com/gemini-testing/gemini/pull/261","diff_url":"https://github.com/gemini-testing/gemini/pull/261.diff","patch_url":"https://github.com/gemini-testing/gemini/pull/261.patch","issue_url":"https://api.github.com/repos/gemini-testing/gemini/issues/261","number":261,"state":"open","locked":false,"title":"Retry suites on positive diff","user":{"login":"SwinX","id":854899,"avatar_url":"https://avatars.githubusercontent.com/u/854899?v=3","gravatar_id":"","url":"https://api.github.com/users/SwinX","html_url":"https://github.com/SwinX","followers_url":"https://api.github.com/users/SwinX/followers","following_url":"https://api.github.com/users/SwinX/following{/other_user}","gists_url":"https://api.github.com/users/SwinX/gists{/gist_id}","starred_url":"https://api.github.com/users/SwinX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwinX/subscriptions","organizations_url":"https://api.github.com/users/SwinX/orgs","repos_url":"https://api.github.com/users/SwinX/repos","events_url":"https://api.github.com/users/SwinX/events{/privacy}","received_events_url":"https://api.github.com/users/SwinX/received_events","type":"User","site_admin":false},"body":"resolves #251 ","created_at":"2015-10-12T13:16:34Z","updated_at":"2015-11-17T19:03:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8b50ce9bc7343e8e0865f9a65982ba4375109e8","assignee":{"login":"SwinX","id":854899,"avatar_url":"https://avatars.githubusercontent.com/u/854899?v=3","gravatar_id":"","url":"https://api.github.com/users/SwinX","html_url":"https://github.com/SwinX","followers_url":"https://api.github.com/users/SwinX/followers","following_url":"https://api.github.com/users/SwinX/following{/other_user}","gists_url":"https://api.github.com/users/SwinX/gists{/gist_id}","starred_url":"https://api.github.com/users/SwinX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwinX/subscriptions","organizations_url":"https://api.github.com/users/SwinX/orgs","repos_url":"https://api.github.com/users/SwinX/repos","events_url":"https://api.github.com/users/SwinX/events{/privacy}","received_events_url":"https://api.github.com/users/SwinX/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/gemini-testing/gemini/pulls/261/commits","review_comments_url":"https://api.github.com/repos/gemini-testing/gemini/pulls/261/comments","review_comment_url":"https://api.github.com/repos/gemini-testing/gemini/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gemini-testing/gemini/issues/261/comments","statuses_url":"https://api.github.com/repos/gemini-testing/gemini/statuses/a0d9d8c5e90dc465bf6bd0cd0c38e4f458c1286b","head":{"label":"gemini-testing:issue-251","ref":"issue-251","sha":"a0d9d8c5e90dc465bf6bd0cd0c38e4f458c1286b","user":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"repo":{"id":16734168,"name":"gemini","full_name":"gemini-testing/gemini","owner":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-testing/gemini","description":"Utility for regression testing of web pages using screenshots","fork":false,"url":"https://api.github.com/repos/gemini-testing/gemini","forks_url":"https://api.github.com/repos/gemini-testing/gemini/forks","keys_url":"https://api.github.com/repos/gemini-testing/gemini/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-testing/gemini/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-testing/gemini/teams","hooks_url":"https://api.github.com/repos/gemini-testing/gemini/hooks","issue_events_url":"https://api.github.com/repos/gemini-testing/gemini/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-testing/gemini/events","assignees_url":"https://api.github.com/repos/gemini-testing/gemini/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-testing/gemini/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-testing/gemini/tags","blobs_url":"https://api.github.com/repos/gemini-testing/gemini/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-testing/gemini/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-testing/gemini/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-testing/gemini/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-testing/gemini/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-testing/gemini/languages","stargazers_url":"https://api.github.com/repos/gemini-testing/gemini/stargazers","contributors_url":"https://api.github.com/repos/gemini-testing/gemini/contributors","subscribers_url":"https://api.github.com/repos/gemini-testing/gemini/subscribers","subscription_url":"https://api.github.com/repos/gemini-testing/gemini/subscription","commits_url":"https://api.github.com/repos/gemini-testing/gemini/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-testing/gemini/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-testing/gemini/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-testing/gemini/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-testing/gemini/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-testing/gemini/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-testing/gemini/merges","archive_url":"https://api.github.com/repos/gemini-testing/gemini/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-testing/gemini/downloads","issues_url":"https://api.github.com/repos/gemini-testing/gemini/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-testing/gemini/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-testing/gemini/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-testing/gemini/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-testing/gemini/labels{/name}","releases_url":"https://api.github.com/repos/gemini-testing/gemini/releases{/id}","created_at":"2014-02-11T14:58:41Z","updated_at":"2015-11-17T12:38:01Z","pushed_at":"2015-11-17T15:48:24Z","git_url":"git://github.com/gemini-testing/gemini.git","ssh_url":"git@github.com:gemini-testing/gemini.git","clone_url":"https://github.com/gemini-testing/gemini.git","svn_url":"https://github.com/gemini-testing/gemini","homepage":null,"size":1246,"stargazers_count":463,"watchers_count":463,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":67,"forks":54,"open_issues":67,"watchers":463,"default_branch":"master"}},"base":{"label":"gemini-testing:master","ref":"master","sha":"b137c33a6bdde5682f32c4e862d2de6f65e82169","user":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"repo":{"id":16734168,"name":"gemini","full_name":"gemini-testing/gemini","owner":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-testing/gemini","description":"Utility for regression testing of web pages using screenshots","fork":false,"url":"https://api.github.com/repos/gemini-testing/gemini","forks_url":"https://api.github.com/repos/gemini-testing/gemini/forks","keys_url":"https://api.github.com/repos/gemini-testing/gemini/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-testing/gemini/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-testing/gemini/teams","hooks_url":"https://api.github.com/repos/gemini-testing/gemini/hooks","issue_events_url":"https://api.github.com/repos/gemini-testing/gemini/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-testing/gemini/events","assignees_url":"https://api.github.com/repos/gemini-testing/gemini/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-testing/gemini/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-testing/gemini/tags","blobs_url":"https://api.github.com/repos/gemini-testing/gemini/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-testing/gemini/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-testing/gemini/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-testing/gemini/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-testing/gemini/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-testing/gemini/languages","stargazers_url":"https://api.github.com/repos/gemini-testing/gemini/stargazers","contributors_url":"https://api.github.com/repos/gemini-testing/gemini/contributors","subscribers_url":"https://api.github.com/repos/gemini-testing/gemini/subscribers","subscription_url":"https://api.github.com/repos/gemini-testing/gemini/subscription","commits_url":"https://api.github.com/repos/gemini-testing/gemini/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-testing/gemini/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-testing/gemini/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-testing/gemini/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-testing/gemini/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-testing/gemini/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-testing/gemini/merges","archive_url":"https://api.github.com/repos/gemini-testing/gemini/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-testing/gemini/downloads","issues_url":"https://api.github.com/repos/gemini-testing/gemini/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-testing/gemini/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-testing/gemini/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-testing/gemini/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-testing/gemini/labels{/name}","releases_url":"https://api.github.com/repos/gemini-testing/gemini/releases{/id}","created_at":"2014-02-11T14:58:41Z","updated_at":"2015-11-17T12:38:01Z","pushed_at":"2015-11-17T15:48:24Z","git_url":"git://github.com/gemini-testing/gemini.git","ssh_url":"git@github.com:gemini-testing/gemini.git","clone_url":"https://github.com/gemini-testing/gemini.git","svn_url":"https://github.com/gemini-testing/gemini","homepage":null,"size":1246,"stargazers_count":463,"watchers_count":463,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":67,"forks":54,"open_issues":67,"watchers":463,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/261"},"html":{"href":"https://github.com/gemini-testing/gemini/pull/261"},"issue":{"href":"https://api.github.com/repos/gemini-testing/gemini/issues/261"},"comments":{"href":"https://api.github.com/repos/gemini-testing/gemini/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/gemini-testing/gemini/statuses/a0d9d8c5e90dc465bf6bd0cd0c38e4f458c1286b"}}}}