{"action":"created","comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments/113360675","pull_request_review_id":34740856,"id":113360675,"diff_hunk":"@@ -103,23 +103,26 @@ public void stats_longRunningTask_durable()\n \n         String key = generateKeyOwnedBy(instances[1]);\n \n-        ICountDownLatch latch = instances[0].getCountDownLatch(\"latch\");\n-        latch.trySetCount(6);\n+        ICountDownLatch firstLatch = instances[0].getCountDownLatch(\"firstLatch\");\n+        firstLatch.trySetCount(2);\n+\n+        ICountDownLatch lastLatch = instances[0].getCountDownLatch(\"lastLatch\");\n+        lastLatch.trySetCount(6);\n \n         IScheduledExecutorService executorService = getScheduledExecutor(instances, \"s\");\n         IScheduledFuture future = executorService.scheduleOnKeyOwnerAtFixedRate(\n-                new ICountdownLatchRunnableTask(\"latch\"), key, 0, 10, SECONDS);\n+                new ICountdownLatchRunnableTask(\"firstLatch\", \"lastLatch\"), key, 0, 10, SECONDS);\n \n-        Thread.sleep(12000);\n+        firstLatch.await(12, SECONDS);\n \n         instances[1].getLifecycleService().shutdown();\n \n-        latch.await(70, SECONDS);\n+        lastLatch.await(70, SECONDS);\n         sleepSeconds(4); // Wait for run-cycle to finish before cancelling, in order for stats to get updated.\n         future.cancel(false);\n \n         ScheduledTaskStatistics stats = future.getStats();\n-        assertEquals(6, stats.getTotalRuns());\n+        assertEquals(6, stats.getTotalRuns(), 1);","path":"hazelcast/src/test/java/com/hazelcast/scheduledexecutor/ScheduledExecutorServiceSlowTest.java","position":29,"original_position":29,"commit_id":"e2ecd34a5a2f879ae103543cd94673d662c64e6f","original_commit_id":"e2ecd34a5a2f879ae103543cd94673d662c64e6f","user":{"login":"pveentjer","id":105243,"avatar_url":"https://avatars1.githubusercontent.com/u/105243?v=3","gravatar_id":"","url":"https://api.github.com/users/pveentjer","html_url":"https://github.com/pveentjer","followers_url":"https://api.github.com/users/pveentjer/followers","following_url":"https://api.github.com/users/pveentjer/following{/other_user}","gists_url":"https://api.github.com/users/pveentjer/gists{/gist_id}","starred_url":"https://api.github.com/users/pveentjer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pveentjer/subscriptions","organizations_url":"https://api.github.com/users/pveentjer/orgs","repos_url":"https://api.github.com/users/pveentjer/repos","events_url":"https://api.github.com/users/pveentjer/events{/privacy}","received_events_url":"https://api.github.com/users/pveentjer/received_events","type":"User","site_admin":false},"body":"I agree with @vbekiaris ; relying on time is a royal PITA.\r\n\r\nWhich future are you referring too? ","created_at":"2017-04-26T03:56:09Z","updated_at":"2017-04-26T03:56:09Z","html_url":"https://github.com/hazelcast/hazelcast/pull/10296#discussion_r113360675","pull_request_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/10296","_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments/113360675"},"html":{"href":"https://github.com/hazelcast/hazelcast/pull/10296#discussion_r113360675"},"pull_request":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/10296"}}},"pull_request":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/10296","id":115265786,"html_url":"https://github.com/hazelcast/hazelcast/pull/10296","diff_url":"https://github.com/hazelcast/hazelcast/pull/10296.diff","patch_url":"https://github.com/hazelcast/hazelcast/pull/10296.patch","issue_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/10296","number":10296,"state":"open","locked":false,"title":"Add delta for long running durable task test","user":{"login":"tkountis","id":3369598,"avatar_url":"https://avatars1.githubusercontent.com/u/3369598?v=3","gravatar_id":"","url":"https://api.github.com/users/tkountis","html_url":"https://github.com/tkountis","followers_url":"https://api.github.com/users/tkountis/followers","following_url":"https://api.github.com/users/tkountis/following{/other_user}","gists_url":"https://api.github.com/users/tkountis/gists{/gist_id}","starred_url":"https://api.github.com/users/tkountis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkountis/subscriptions","organizations_url":"https://api.github.com/users/tkountis/orgs","repos_url":"https://api.github.com/users/tkountis/repos","events_url":"https://api.github.com/users/tkountis/events{/privacy}","received_events_url":"https://api.github.com/users/tkountis/received_events","type":"User","site_admin":false},"body":"Can't see anything wrong with the test or functionality.\r\nThere is a small chance of delays + sleep time to add up to yet another schedule of the task, and cause the wrong assertion. With the delta we expect a minimum of 6 and maximum of 7.\r\n\r\nImproved the implementation by removing the sleep and using a second latch.\r\n\r\nFix #10071\r\n","created_at":"2017-04-11T08:25:41Z","updated_at":"2017-04-26T03:56:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ee4393eaa75a830d7300ad7b1eb3cb89d590f70","assignee":{"login":"tkountis","id":3369598,"avatar_url":"https://avatars1.githubusercontent.com/u/3369598?v=3","gravatar_id":"","url":"https://api.github.com/users/tkountis","html_url":"https://github.com/tkountis","followers_url":"https://api.github.com/users/tkountis/followers","following_url":"https://api.github.com/users/tkountis/following{/other_user}","gists_url":"https://api.github.com/users/tkountis/gists{/gist_id}","starred_url":"https://api.github.com/users/tkountis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkountis/subscriptions","organizations_url":"https://api.github.com/users/tkountis/orgs","repos_url":"https://api.github.com/users/tkountis/repos","events_url":"https://api.github.com/users/tkountis/events{/privacy}","received_events_url":"https://api.github.com/users/tkountis/received_events","type":"User","site_admin":false},"assignees":[{"login":"tkountis","id":3369598,"avatar_url":"https://avatars1.githubusercontent.com/u/3369598?v=3","gravatar_id":"","url":"https://api.github.com/users/tkountis","html_url":"https://github.com/tkountis","followers_url":"https://api.github.com/users/tkountis/followers","following_url":"https://api.github.com/users/tkountis/following{/other_user}","gists_url":"https://api.github.com/users/tkountis/gists{/gist_id}","starred_url":"https://api.github.com/users/tkountis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkountis/subscriptions","organizations_url":"https://api.github.com/users/tkountis/orgs","repos_url":"https://api.github.com/users/tkountis/repos","events_url":"https://api.github.com/users/tkountis/events{/privacy}","received_events_url":"https://api.github.com/users/tkountis/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/87","html_url":"https://github.com/hazelcast/hazelcast/milestone/87","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/87/labels","id":2165710,"number":87,"title":"3.9","description":"","creator":{"login":"degerhz","id":8373100,"avatar_url":"https://avatars0.githubusercontent.com/u/8373100?v=3","gravatar_id":"","url":"https://api.github.com/users/degerhz","html_url":"https://github.com/degerhz","followers_url":"https://api.github.com/users/degerhz/followers","following_url":"https://api.github.com/users/degerhz/following{/other_user}","gists_url":"https://api.github.com/users/degerhz/gists{/gist_id}","starred_url":"https://api.github.com/users/degerhz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/degerhz/subscriptions","organizations_url":"https://api.github.com/users/degerhz/orgs","repos_url":"https://api.github.com/users/degerhz/repos","events_url":"https://api.github.com/users/degerhz/events{/privacy}","received_events_url":"https://api.github.com/users/degerhz/received_events","type":"User","site_admin":false},"open_issues":149,"closed_issues":259,"state":"open","created_at":"2016-11-30T08:32:28Z","updated_at":"2017-04-25T20:54:24Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/10296/commits","review_comments_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/10296/comments","review_comment_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/10296/comments","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast/statuses/e2ecd34a5a2f879ae103543cd94673d662c64e6f","head":{"label":"tkountis:fix/3.9/longrunning_durable_inc_delta","ref":"fix/3.9/longrunning_durable_inc_delta","sha":"e2ecd34a5a2f879ae103543cd94673d662c64e6f","user":{"login":"tkountis","id":3369598,"avatar_url":"https://avatars1.githubusercontent.com/u/3369598?v=3","gravatar_id":"","url":"https://api.github.com/users/tkountis","html_url":"https://github.com/tkountis","followers_url":"https://api.github.com/users/tkountis/followers","following_url":"https://api.github.com/users/tkountis/following{/other_user}","gists_url":"https://api.github.com/users/tkountis/gists{/gist_id}","starred_url":"https://api.github.com/users/tkountis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkountis/subscriptions","organizations_url":"https://api.github.com/users/tkountis/orgs","repos_url":"https://api.github.com/users/tkountis/repos","events_url":"https://api.github.com/users/tkountis/events{/privacy}","received_events_url":"https://api.github.com/users/tkountis/received_events","type":"User","site_admin":false},"repo":{"id":66834097,"name":"hazelcast","full_name":"tkountis/hazelcast","owner":{"login":"tkountis","id":3369598,"avatar_url":"https://avatars1.githubusercontent.com/u/3369598?v=3","gravatar_id":"","url":"https://api.github.com/users/tkountis","html_url":"https://github.com/tkountis","followers_url":"https://api.github.com/users/tkountis/followers","following_url":"https://api.github.com/users/tkountis/following{/other_user}","gists_url":"https://api.github.com/users/tkountis/gists{/gist_id}","starred_url":"https://api.github.com/users/tkountis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkountis/subscriptions","organizations_url":"https://api.github.com/users/tkountis/orgs","repos_url":"https://api.github.com/users/tkountis/repos","events_url":"https://api.github.com/users/tkountis/events{/privacy}","received_events_url":"https://api.github.com/users/tkountis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tkountis/hazelcast","description":"Open Source In-Memory Data Grid","fork":true,"url":"https://api.github.com/repos/tkountis/hazelcast","forks_url":"https://api.github.com/repos/tkountis/hazelcast/forks","keys_url":"https://api.github.com/repos/tkountis/hazelcast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tkountis/hazelcast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tkountis/hazelcast/teams","hooks_url":"https://api.github.com/repos/tkountis/hazelcast/hooks","issue_events_url":"https://api.github.com/repos/tkountis/hazelcast/issues/events{/number}","events_url":"https://api.github.com/repos/tkountis/hazelcast/events","assignees_url":"https://api.github.com/repos/tkountis/hazelcast/assignees{/user}","branches_url":"https://api.github.com/repos/tkountis/hazelcast/branches{/branch}","tags_url":"https://api.github.com/repos/tkountis/hazelcast/tags","blobs_url":"https://api.github.com/repos/tkountis/hazelcast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tkountis/hazelcast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tkountis/hazelcast/git/refs{/sha}","trees_url":"https://api.github.com/repos/tkountis/hazelcast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tkountis/hazelcast/statuses/{sha}","languages_url":"https://api.github.com/repos/tkountis/hazelcast/languages","stargazers_url":"https://api.github.com/repos/tkountis/hazelcast/stargazers","contributors_url":"https://api.github.com/repos/tkountis/hazelcast/contributors","subscribers_url":"https://api.github.com/repos/tkountis/hazelcast/subscribers","subscription_url":"https://api.github.com/repos/tkountis/hazelcast/subscription","commits_url":"https://api.github.com/repos/tkountis/hazelcast/commits{/sha}","git_commits_url":"https://api.github.com/repos/tkountis/hazelcast/git/commits{/sha}","comments_url":"https://api.github.com/repos/tkountis/hazelcast/comments{/number}","issue_comment_url":"https://api.github.com/repos/tkountis/hazelcast/issues/comments{/number}","contents_url":"https://api.github.com/repos/tkountis/hazelcast/contents/{+path}","compare_url":"https://api.github.com/repos/tkountis/hazelcast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tkountis/hazelcast/merges","archive_url":"https://api.github.com/repos/tkountis/hazelcast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tkountis/hazelcast/downloads","issues_url":"https://api.github.com/repos/tkountis/hazelcast/issues{/number}","pulls_url":"https://api.github.com/repos/tkountis/hazelcast/pulls{/number}","milestones_url":"https://api.github.com/repos/tkountis/hazelcast/milestones{/number}","notifications_url":"https://api.github.com/repos/tkountis/hazelcast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tkountis/hazelcast/labels{/name}","releases_url":"https://api.github.com/repos/tkountis/hazelcast/releases{/id}","deployments_url":"https://api.github.com/repos/tkountis/hazelcast/deployments","created_at":"2016-08-29T10:27:48Z","updated_at":"2016-08-29T10:28:03Z","pushed_at":"2017-04-25T15:20:22Z","git_url":"git://github.com/tkountis/hazelcast.git","ssh_url":"git@github.com:tkountis/hazelcast.git","clone_url":"https://github.com/tkountis/hazelcast.git","svn_url":"https://github.com/tkountis/hazelcast","homepage":"www.hazelcast.com","size":109508,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"hazelcast:master","ref":"master","sha":"f4c33973f2e5f804f6743683b11c8a43922bfc7e","user":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars1.githubusercontent.com/u/1453152?v=3","gravatar_id":"","url":"https://api.github.com/users/hazelcast","html_url":"https://github.com/hazelcast","followers_url":"https://api.github.com/users/hazelcast/followers","following_url":"https://api.github.com/users/hazelcast/following{/other_user}","gists_url":"https://api.github.com/users/hazelcast/gists{/gist_id}","starred_url":"https://api.github.com/users/hazelcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazelcast/subscriptions","organizations_url":"https://api.github.com/users/hazelcast/orgs","repos_url":"https://api.github.com/users/hazelcast/repos","events_url":"https://api.github.com/users/hazelcast/events{/privacy}","received_events_url":"https://api.github.com/users/hazelcast/received_events","type":"Organization","site_admin":false},"repo":{"id":3786237,"name":"hazelcast","full_name":"hazelcast/hazelcast","owner":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars1.githubusercontent.com/u/1453152?v=3","gravatar_id":"","url":"https://api.github.com/users/hazelcast","html_url":"https://github.com/hazelcast","followers_url":"https://api.github.com/users/hazelcast/followers","following_url":"https://api.github.com/users/hazelcast/following{/other_user}","gists_url":"https://api.github.com/users/hazelcast/gists{/gist_id}","starred_url":"https://api.github.com/users/hazelcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazelcast/subscriptions","organizations_url":"https://api.github.com/users/hazelcast/orgs","repos_url":"https://api.github.com/users/hazelcast/repos","events_url":"https://api.github.com/users/hazelcast/events{/privacy}","received_events_url":"https://api.github.com/users/hazelcast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hazelcast/hazelcast","description":"Open Source In-Memory Data Grid","fork":false,"url":"https://api.github.com/repos/hazelcast/hazelcast","forks_url":"https://api.github.com/repos/hazelcast/hazelcast/forks","keys_url":"https://api.github.com/repos/hazelcast/hazelcast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hazelcast/hazelcast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hazelcast/hazelcast/teams","hooks_url":"https://api.github.com/repos/hazelcast/hazelcast/hooks","issue_events_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/events{/number}","events_url":"https://api.github.com/repos/hazelcast/hazelcast/events","assignees_url":"https://api.github.com/repos/hazelcast/hazelcast/assignees{/user}","branches_url":"https://api.github.com/repos/hazelcast/hazelcast/branches{/branch}","tags_url":"https://api.github.com/repos/hazelcast/hazelcast/tags","blobs_url":"https://api.github.com/repos/hazelcast/hazelcast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hazelcast/hazelcast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hazelcast/hazelcast/git/refs{/sha}","trees_url":"https://api.github.com/repos/hazelcast/hazelcast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast/statuses/{sha}","languages_url":"https://api.github.com/repos/hazelcast/hazelcast/languages","stargazers_url":"https://api.github.com/repos/hazelcast/hazelcast/stargazers","contributors_url":"https://api.github.com/repos/hazelcast/hazelcast/contributors","subscribers_url":"https://api.github.com/repos/hazelcast/hazelcast/subscribers","subscription_url":"https://api.github.com/repos/hazelcast/hazelcast/subscription","commits_url":"https://api.github.com/repos/hazelcast/hazelcast/commits{/sha}","git_commits_url":"https://api.github.com/repos/hazelcast/hazelcast/git/commits{/sha}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/comments{/number}","issue_comment_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/comments{/number}","contents_url":"https://api.github.com/repos/hazelcast/hazelcast/contents/{+path}","compare_url":"https://api.github.com/repos/hazelcast/hazelcast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hazelcast/hazelcast/merges","archive_url":"https://api.github.com/repos/hazelcast/hazelcast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hazelcast/hazelcast/downloads","issues_url":"https://api.github.com/repos/hazelcast/hazelcast/issues{/number}","pulls_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls{/number}","milestones_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones{/number}","notifications_url":"https://api.github.com/repos/hazelcast/hazelcast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/labels{/name}","releases_url":"https://api.github.com/repos/hazelcast/hazelcast/releases{/id}","deployments_url":"https://api.github.com/repos/hazelcast/hazelcast/deployments","created_at":"2012-03-21T12:25:18Z","updated_at":"2017-04-25T10:24:34Z","pushed_at":"2017-04-25T17:11:09Z","git_url":"git://github.com/hazelcast/hazelcast.git","ssh_url":"git@github.com:hazelcast/hazelcast.git","clone_url":"https://github.com/hazelcast/hazelcast.git","svn_url":"https://github.com/hazelcast/hazelcast","homepage":"http://www.hazelcast.org","size":110037,"stargazers_count":2029,"watchers_count":2029,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":881,"mirror_url":null,"open_issues_count":645,"forks":881,"open_issues":645,"watchers":2029,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/10296"},"html":{"href":"https://github.com/hazelcast/hazelcast/pull/10296"},"issue":{"href":"https://api.github.com/repos/hazelcast/hazelcast/issues/10296"},"comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast/issues/10296/comments"},"review_comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/10296/comments"},"review_comment":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/10296/commits"},"statuses":{"href":"https://api.github.com/repos/hazelcast/hazelcast/statuses/e2ecd34a5a2f879ae103543cd94673d662c64e6f"}}}}
{"actor":{"display_login":"pveentjer"}}