{"action":"created","comment":{"url":"https://api.github.com/repos/ehcache/ehcache3/pulls/comments/79872160","id":79872160,"diff_hunk":"@@ -190,26 +190,38 @@ public void test_stats_collection() throws Exception {\n     cache1.get(\"key1\");\n     cache1.get(\"key2\");\n \n-    // get the stats (we are getting the primitive counter, not the sample history)\n-    ContextualStatistics[] stats = waitForNextStats();\n-    Sample<Long>[] samples = stats[0].getStatistic(CounterHistory.class, \"Cache:HitCount\").getValue();\n \n-    assertThat(stats.length, equalTo(1));\n-    assertThat(stats[0].getContext().get(\"cacheName\"), equalTo(\"cache-1\"));\n-    assertThat(samples[0].getValue(), equalTo(2L));\n+    long val = 0;\n+\n+    // it could be several seconds before the sampled stats could become available\n+    // let's try until we find the correct value : 2\n+    do {\n+\n+      // get the stats (we are getting the primitive counter, not the sample history)\n+      ContextualStatistics[] stats = waitForNextStats();\n+      Sample<Long>[] samples = stats[0].getStatistic(CounterHistory.class, \"Cache:HitCount\").getValue();\n+\n+      if(stats.length == 1 && stats[0].getContext().get(\"cacheName\").equals(\"cache-1\") && samples.length > 0) {\n+        val = samples[samples.length - 1].getValue();\n+      }\n+    } while(val != 2);","path":"clustered/integration-test/src/test/java/org/ehcache/clustered/management/ClusteringManagementServiceTest.java","position":24,"original_position":24,"commit_id":"5d1ef12c17519493b6bac28215d931f09cc792b5","original_commit_id":"5d1ef12c17519493b6bac28215d931f09cc792b5","user":{"login":"chrisdennis","id":954331,"avatar_url":"https://avatars.githubusercontent.com/u/954331?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisdennis","html_url":"https://github.com/chrisdennis","followers_url":"https://api.github.com/users/chrisdennis/followers","following_url":"https://api.github.com/users/chrisdennis/following{/other_user}","gists_url":"https://api.github.com/users/chrisdennis/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdennis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdennis/subscriptions","organizations_url":"https://api.github.com/users/chrisdennis/orgs","repos_url":"https://api.github.com/users/chrisdennis/repos","events_url":"https://api.github.com/users/chrisdennis/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdennis/received_events","type":"User","site_admin":false},"body":"So the failure symptom is an infinite loop?","created_at":"2016-09-21T16:13:23Z","updated_at":"2016-09-21T16:14:16Z","html_url":"https://github.com/ehcache/ehcache3/pull/1457#discussion_r79872160","pull_request_url":"https://api.github.com/repos/ehcache/ehcache3/pulls/1457","_links":{"self":{"href":"https://api.github.com/repos/ehcache/ehcache3/pulls/comments/79872160"},"html":{"href":"https://github.com/ehcache/ehcache3/pull/1457#discussion_r79872160"},"pull_request":{"href":"https://api.github.com/repos/ehcache/ehcache3/pulls/1457"}}},"pull_request":{"url":"https://api.github.com/repos/ehcache/ehcache3/pulls/1457","id":86029791,"html_url":"https://github.com/ehcache/ehcache3/pull/1457","diff_url":"https://github.com/ehcache/ehcache3/pull/1457.diff","patch_url":"https://github.com/ehcache/ehcache3/pull/1457.patch","issue_url":"https://api.github.com/repos/ehcache/ehcache3/issues/1457","number":1457,"state":"open","locked":false,"title":"Fix unstable stats tests","user":{"login":"anthonydahanne","id":60938,"avatar_url":"https://avatars.githubusercontent.com/u/60938?v=3","gravatar_id":"","url":"https://api.github.com/users/anthonydahanne","html_url":"https://github.com/anthonydahanne","followers_url":"https://api.github.com/users/anthonydahanne/followers","following_url":"https://api.github.com/users/anthonydahanne/following{/other_user}","gists_url":"https://api.github.com/users/anthonydahanne/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonydahanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonydahanne/subscriptions","organizations_url":"https://api.github.com/users/anthonydahanne/orgs","repos_url":"https://api.github.com/users/anthonydahanne/repos","events_url":"https://api.github.com/users/anthonydahanne/events{/privacy}","received_events_url":"https://api.github.com/users/anthonydahanne/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-20T18:23:39Z","updated_at":"2016-09-21T16:14:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94b5a5d136bebacf42d77fdeaf5bd27c79c4022f","assignee":{"login":"mathieucarbou","id":61346,"avatar_url":"https://avatars.githubusercontent.com/u/61346?v=3","gravatar_id":"","url":"https://api.github.com/users/mathieucarbou","html_url":"https://github.com/mathieucarbou","followers_url":"https://api.github.com/users/mathieucarbou/followers","following_url":"https://api.github.com/users/mathieucarbou/following{/other_user}","gists_url":"https://api.github.com/users/mathieucarbou/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieucarbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieucarbou/subscriptions","organizations_url":"https://api.github.com/users/mathieucarbou/orgs","repos_url":"https://api.github.com/users/mathieucarbou/repos","events_url":"https://api.github.com/users/mathieucarbou/events{/privacy}","received_events_url":"https://api.github.com/users/mathieucarbou/received_events","type":"User","site_admin":false},"assignees":[{"login":"mathieucarbou","id":61346,"avatar_url":"https://avatars.githubusercontent.com/u/61346?v=3","gravatar_id":"","url":"https://api.github.com/users/mathieucarbou","html_url":"https://github.com/mathieucarbou","followers_url":"https://api.github.com/users/mathieucarbou/followers","following_url":"https://api.github.com/users/mathieucarbou/following{/other_user}","gists_url":"https://api.github.com/users/mathieucarbou/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieucarbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieucarbou/subscriptions","organizations_url":"https://api.github.com/users/mathieucarbou/orgs","repos_url":"https://api.github.com/users/mathieucarbou/repos","events_url":"https://api.github.com/users/mathieucarbou/events{/privacy}","received_events_url":"https://api.github.com/users/mathieucarbou/received_events","type":"User","site_admin":false},{"login":"gibsong","id":6646921,"avatar_url":"https://avatars.githubusercontent.com/u/6646921?v=3","gravatar_id":"","url":"https://api.github.com/users/gibsong","html_url":"https://github.com/gibsong","followers_url":"https://api.github.com/users/gibsong/followers","following_url":"https://api.github.com/users/gibsong/following{/other_user}","gists_url":"https://api.github.com/users/gibsong/gists{/gist_id}","starred_url":"https://api.github.com/users/gibsong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gibsong/subscriptions","organizations_url":"https://api.github.com/users/gibsong/orgs","repos_url":"https://api.github.com/users/gibsong/repos","events_url":"https://api.github.com/users/gibsong/events{/privacy}","received_events_url":"https://api.github.com/users/gibsong/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ehcache/ehcache3/pulls/1457/commits","review_comments_url":"https://api.github.com/repos/ehcache/ehcache3/pulls/1457/comments","review_comment_url":"https://api.github.com/repos/ehcache/ehcache3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ehcache/ehcache3/issues/1457/comments","statuses_url":"https://api.github.com/repos/ehcache/ehcache3/statuses/5d1ef12c17519493b6bac28215d931f09cc792b5","head":{"label":"anthonydahanne:fix_stats_test","ref":"fix_stats_test","sha":"5d1ef12c17519493b6bac28215d931f09cc792b5","user":{"login":"anthonydahanne","id":60938,"avatar_url":"https://avatars.githubusercontent.com/u/60938?v=3","gravatar_id":"","url":"https://api.github.com/users/anthonydahanne","html_url":"https://github.com/anthonydahanne","followers_url":"https://api.github.com/users/anthonydahanne/followers","following_url":"https://api.github.com/users/anthonydahanne/following{/other_user}","gists_url":"https://api.github.com/users/anthonydahanne/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonydahanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonydahanne/subscriptions","organizations_url":"https://api.github.com/users/anthonydahanne/orgs","repos_url":"https://api.github.com/users/anthonydahanne/repos","events_url":"https://api.github.com/users/anthonydahanne/events{/privacy}","received_events_url":"https://api.github.com/users/anthonydahanne/received_events","type":"User","site_admin":false},"repo":{"id":23930009,"name":"ehcache3","full_name":"anthonydahanne/ehcache3","owner":{"login":"anthonydahanne","id":60938,"avatar_url":"https://avatars.githubusercontent.com/u/60938?v=3","gravatar_id":"","url":"https://api.github.com/users/anthonydahanne","html_url":"https://github.com/anthonydahanne","followers_url":"https://api.github.com/users/anthonydahanne/followers","following_url":"https://api.github.com/users/anthonydahanne/following{/other_user}","gists_url":"https://api.github.com/users/anthonydahanne/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonydahanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonydahanne/subscriptions","organizations_url":"https://api.github.com/users/anthonydahanne/orgs","repos_url":"https://api.github.com/users/anthonydahanne/repos","events_url":"https://api.github.com/users/anthonydahanne/events{/privacy}","received_events_url":"https://api.github.com/users/anthonydahanne/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anthonydahanne/ehcache3","description":"Ehcache 3.x line ","fork":true,"url":"https://api.github.com/repos/anthonydahanne/ehcache3","forks_url":"https://api.github.com/repos/anthonydahanne/ehcache3/forks","keys_url":"https://api.github.com/repos/anthonydahanne/ehcache3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anthonydahanne/ehcache3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anthonydahanne/ehcache3/teams","hooks_url":"https://api.github.com/repos/anthonydahanne/ehcache3/hooks","issue_events_url":"https://api.github.com/repos/anthonydahanne/ehcache3/issues/events{/number}","events_url":"https://api.github.com/repos/anthonydahanne/ehcache3/events","assignees_url":"https://api.github.com/repos/anthonydahanne/ehcache3/assignees{/user}","branches_url":"https://api.github.com/repos/anthonydahanne/ehcache3/branches{/branch}","tags_url":"https://api.github.com/repos/anthonydahanne/ehcache3/tags","blobs_url":"https://api.github.com/repos/anthonydahanne/ehcache3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anthonydahanne/ehcache3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anthonydahanne/ehcache3/git/refs{/sha}","trees_url":"https://api.github.com/repos/anthonydahanne/ehcache3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anthonydahanne/ehcache3/statuses/{sha}","languages_url":"https://api.github.com/repos/anthonydahanne/ehcache3/languages","stargazers_url":"https://api.github.com/repos/anthonydahanne/ehcache3/stargazers","contributors_url":"https://api.github.com/repos/anthonydahanne/ehcache3/contributors","subscribers_url":"https://api.github.com/repos/anthonydahanne/ehcache3/subscribers","subscription_url":"https://api.github.com/repos/anthonydahanne/ehcache3/subscription","commits_url":"https://api.github.com/repos/anthonydahanne/ehcache3/commits{/sha}","git_commits_url":"https://api.github.com/repos/anthonydahanne/ehcache3/git/commits{/sha}","comments_url":"https://api.github.com/repos/anthonydahanne/ehcache3/comments{/number}","issue_comment_url":"https://api.github.com/repos/anthonydahanne/ehcache3/issues/comments{/number}","contents_url":"https://api.github.com/repos/anthonydahanne/ehcache3/contents/{+path}","compare_url":"https://api.github.com/repos/anthonydahanne/ehcache3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anthonydahanne/ehcache3/merges","archive_url":"https://api.github.com/repos/anthonydahanne/ehcache3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anthonydahanne/ehcache3/downloads","issues_url":"https://api.github.com/repos/anthonydahanne/ehcache3/issues{/number}","pulls_url":"https://api.github.com/repos/anthonydahanne/ehcache3/pulls{/number}","milestones_url":"https://api.github.com/repos/anthonydahanne/ehcache3/milestones{/number}","notifications_url":"https://api.github.com/repos/anthonydahanne/ehcache3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anthonydahanne/ehcache3/labels{/name}","releases_url":"https://api.github.com/repos/anthonydahanne/ehcache3/releases{/id}","deployments_url":"https://api.github.com/repos/anthonydahanne/ehcache3/deployments","created_at":"2014-09-11T18:15:43Z","updated_at":"2016-06-03T21:20:41Z","pushed_at":"2016-09-21T15:45:15Z","git_url":"git://github.com/anthonydahanne/ehcache3.git","ssh_url":"git@github.com:anthonydahanne/ehcache3.git","clone_url":"https://github.com/anthonydahanne/ehcache3.git","svn_url":"https://github.com/anthonydahanne/ehcache3","homepage":"ehcache.org","size":11715,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"ehcache:master","ref":"master","sha":"a98ff4213c6ecbd11fe16fec40513cd41ebe113b","user":{"login":"ehcache","id":5504982,"avatar_url":"https://avatars.githubusercontent.com/u/5504982?v=3","gravatar_id":"","url":"https://api.github.com/users/ehcache","html_url":"https://github.com/ehcache","followers_url":"https://api.github.com/users/ehcache/followers","following_url":"https://api.github.com/users/ehcache/following{/other_user}","gists_url":"https://api.github.com/users/ehcache/gists{/gist_id}","starred_url":"https://api.github.com/users/ehcache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehcache/subscriptions","organizations_url":"https://api.github.com/users/ehcache/orgs","repos_url":"https://api.github.com/users/ehcache/repos","events_url":"https://api.github.com/users/ehcache/events{/privacy}","received_events_url":"https://api.github.com/users/ehcache/received_events","type":"Organization","site_admin":false},"repo":{"id":17224514,"name":"ehcache3","full_name":"ehcache/ehcache3","owner":{"login":"ehcache","id":5504982,"avatar_url":"https://avatars.githubusercontent.com/u/5504982?v=3","gravatar_id":"","url":"https://api.github.com/users/ehcache","html_url":"https://github.com/ehcache","followers_url":"https://api.github.com/users/ehcache/followers","following_url":"https://api.github.com/users/ehcache/following{/other_user}","gists_url":"https://api.github.com/users/ehcache/gists{/gist_id}","starred_url":"https://api.github.com/users/ehcache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehcache/subscriptions","organizations_url":"https://api.github.com/users/ehcache/orgs","repos_url":"https://api.github.com/users/ehcache/repos","events_url":"https://api.github.com/users/ehcache/events{/privacy}","received_events_url":"https://api.github.com/users/ehcache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ehcache/ehcache3","description":"Ehcache 3.x line ","fork":false,"url":"https://api.github.com/repos/ehcache/ehcache3","forks_url":"https://api.github.com/repos/ehcache/ehcache3/forks","keys_url":"https://api.github.com/repos/ehcache/ehcache3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ehcache/ehcache3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ehcache/ehcache3/teams","hooks_url":"https://api.github.com/repos/ehcache/ehcache3/hooks","issue_events_url":"https://api.github.com/repos/ehcache/ehcache3/issues/events{/number}","events_url":"https://api.github.com/repos/ehcache/ehcache3/events","assignees_url":"https://api.github.com/repos/ehcache/ehcache3/assignees{/user}","branches_url":"https://api.github.com/repos/ehcache/ehcache3/branches{/branch}","tags_url":"https://api.github.com/repos/ehcache/ehcache3/tags","blobs_url":"https://api.github.com/repos/ehcache/ehcache3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ehcache/ehcache3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ehcache/ehcache3/git/refs{/sha}","trees_url":"https://api.github.com/repos/ehcache/ehcache3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ehcache/ehcache3/statuses/{sha}","languages_url":"https://api.github.com/repos/ehcache/ehcache3/languages","stargazers_url":"https://api.github.com/repos/ehcache/ehcache3/stargazers","contributors_url":"https://api.github.com/repos/ehcache/ehcache3/contributors","subscribers_url":"https://api.github.com/repos/ehcache/ehcache3/subscribers","subscription_url":"https://api.github.com/repos/ehcache/ehcache3/subscription","commits_url":"https://api.github.com/repos/ehcache/ehcache3/commits{/sha}","git_commits_url":"https://api.github.com/repos/ehcache/ehcache3/git/commits{/sha}","comments_url":"https://api.github.com/repos/ehcache/ehcache3/comments{/number}","issue_comment_url":"https://api.github.com/repos/ehcache/ehcache3/issues/comments{/number}","contents_url":"https://api.github.com/repos/ehcache/ehcache3/contents/{+path}","compare_url":"https://api.github.com/repos/ehcache/ehcache3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ehcache/ehcache3/merges","archive_url":"https://api.github.com/repos/ehcache/ehcache3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ehcache/ehcache3/downloads","issues_url":"https://api.github.com/repos/ehcache/ehcache3/issues{/number}","pulls_url":"https://api.github.com/repos/ehcache/ehcache3/pulls{/number}","milestones_url":"https://api.github.com/repos/ehcache/ehcache3/milestones{/number}","notifications_url":"https://api.github.com/repos/ehcache/ehcache3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ehcache/ehcache3/labels{/name}","releases_url":"https://api.github.com/repos/ehcache/ehcache3/releases{/id}","deployments_url":"https://api.github.com/repos/ehcache/ehcache3/deployments","created_at":"2014-02-26T20:39:16Z","updated_at":"2016-09-20T14:25:30Z","pushed_at":"2016-09-21T15:45:16Z","git_url":"git://github.com/ehcache/ehcache3.git","ssh_url":"git@github.com:ehcache/ehcache3.git","clone_url":"https://github.com/ehcache/ehcache3.git","svn_url":"https://github.com/ehcache/ehcache3","homepage":"http://www.ehcache.org","size":14086,"stargazers_count":513,"watchers_count":513,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":265,"mirror_url":null,"open_issues_count":80,"forks":265,"open_issues":80,"watchers":513,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ehcache/ehcache3/pulls/1457"},"html":{"href":"https://github.com/ehcache/ehcache3/pull/1457"},"issue":{"href":"https://api.github.com/repos/ehcache/ehcache3/issues/1457"},"comments":{"href":"https://api.github.com/repos/ehcache/ehcache3/issues/1457/comments"},"review_comments":{"href":"https://api.github.com/repos/ehcache/ehcache3/pulls/1457/comments"},"review_comment":{"href":"https://api.github.com/repos/ehcache/ehcache3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ehcache/ehcache3/pulls/1457/commits"},"statuses":{"href":"https://api.github.com/repos/ehcache/ehcache3/statuses/5d1ef12c17519493b6bac28215d931f09cc792b5"}}}}
{"actor":{"display_login":"chrisdennis"}}