{"action":"created","comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/comments/30150497","id":30150497,"diff_hunk":"@@ -10,59 +10,65 @@\n import com.hazelcast.logging.ILogger;\n import com.hazelcast.logging.Logger;\n import com.hazelcast.simulator.test.TestContext;\n-import com.hazelcast.simulator.test.annotations.Run;\n+import com.hazelcast.simulator.test.TestRunner;\n+import com.hazelcast.simulator.test.annotations.RunWithWorker;\n import com.hazelcast.simulator.test.annotations.Setup;\n import com.hazelcast.simulator.test.annotations.Verify;\n import com.hazelcast.simulator.test.annotations.Warmup;\n-import com.hazelcast.simulator.tests.icache.helpers.MyCacheEntryEventFilter;\n-import com.hazelcast.simulator.tests.icache.helpers.MyCacheEntryListener;\n-import com.hazelcast.simulator.utils.ThreadSpawner;\n+import com.hazelcast.simulator.tests.icache.helpers.ICacheEntryEventFilter;\n+import com.hazelcast.simulator.tests.icache.helpers.ICacheEntryListener;\n+import com.hazelcast.simulator.tests.icache.helpers.ICacheListenerOperationCounter;\n+import com.hazelcast.simulator.worker.selector.OperationSelectorBuilder;\n+import com.hazelcast.simulator.worker.tasks.AbstractWorker;\n \n import javax.cache.Cache;\n import javax.cache.CacheManager;\n import javax.cache.configuration.FactoryBuilder;\n import javax.cache.configuration.MutableCacheEntryListenerConfiguration;\n-import java.io.Serializable;\n-import java.util.Random;\n \n import static com.hazelcast.simulator.tests.helpers.HazelcastTestUtils.isMemberNode;\n \n /**\n- * In This test we concurrently add remove cache listeners while putting and getting from the cache\n- * this test is out side of normal usage, however has found problems where put operations hang\n- * this type of test could uncover memory leaks in the process of adding and removing listeners\n- * The max size of the cache used in this test is keyCount int key/value pairs,\n+ * In this test we concurrently add remove cache listeners while putting and getting from the cache.\n+ *\n+ * This test is out side of normal usage, however has found problems where put operations hang.\n+ * This type of test could uncover memory leaks in the process of adding and removing listeners.\n+ * The max size of the cache used in this test is keyCount int key/value pairs.\n  */\n public class AddRemoveListenerICacheTest {\n \n+    private enum Operation {\n+        REGISTER,\n+        DE_REGISTER,\n+        PUT,\n+        GET\n+    }\n+\n     private static final ILogger LOGGER = Logger.getLogger(AddRemoveListenerICacheTest.class);\n \n-    public int threadCount = 3;\n+    public String basename = AddRemoveListenerICacheTest.class.getSimpleName();\n     public int keyCount = 1000;\n     public boolean syncEvents = true;\n \n-    public double register = 0;\n-    public double deregister = 0;\n-    public double put = 0;\n-    public double get = 0;\n+    public double registerProb = 0.25;","path":"tests/src/main/java/com/hazelcast/simulator/tests/icache/AddRemoveListenerICacheTest.java","position":59,"original_position":59,"commit_id":"7a8b91480506514b3bfdf3441a4b46019d5d86f6","original_commit_id":"7a8b91480506514b3bfdf3441a4b46019d5d86f6","user":{"login":"jerrinot","id":158619,"avatar_url":"https://avatars.githubusercontent.com/u/158619?v=3","gravatar_id":"","url":"https://api.github.com/users/jerrinot","html_url":"https://github.com/jerrinot","followers_url":"https://api.github.com/users/jerrinot/followers","following_url":"https://api.github.com/users/jerrinot/following{/other_user}","gists_url":"https://api.github.com/users/jerrinot/gists{/gist_id}","starred_url":"https://api.github.com/users/jerrinot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerrinot/subscriptions","organizations_url":"https://api.github.com/users/jerrinot/orgs","repos_url":"https://api.github.com/users/jerrinot/repos","events_url":"https://api.github.com/users/jerrinot/events{/privacy}","received_events_url":"https://api.github.com/users/jerrinot/received_events","type":"User","site_admin":false},"body":"such changes are tricky as they can break existing test environments. \r\n@Danny-Hazelcast: is this test used in any of our automated test suites?","created_at":"2015-05-12T16:07:38Z","updated_at":"2015-05-12T16:07:38Z","html_url":"https://github.com/hazelcast/hazelcast-simulator/pull/622#discussion_r30150497","pull_request_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/622","_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/comments/30150497"},"html":{"href":"https://github.com/hazelcast/hazelcast-simulator/pull/622#discussion_r30150497"},"pull_request":{"href":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/622"}}},"pull_request":{"url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/622","id":34337300,"html_url":"https://github.com/hazelcast/hazelcast-simulator/pull/622","diff_url":"https://github.com/hazelcast/hazelcast-simulator/pull/622.diff","patch_url":"https://github.com/hazelcast/hazelcast-simulator/pull/622.patch","issue_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/issues/622","number":622,"state":"open","locked":false,"title":"Cleanup of AddRemoveListenerICacheTest.","user":{"login":"Donnerbart","id":4196298,"avatar_url":"https://avatars.githubusercontent.com/u/4196298?v=3","gravatar_id":"","url":"https://api.github.com/users/Donnerbart","html_url":"https://github.com/Donnerbart","followers_url":"https://api.github.com/users/Donnerbart/followers","following_url":"https://api.github.com/users/Donnerbart/following{/other_user}","gists_url":"https://api.github.com/users/Donnerbart/gists{/gist_id}","starred_url":"https://api.github.com/users/Donnerbart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Donnerbart/subscriptions","organizations_url":"https://api.github.com/users/Donnerbart/orgs","repos_url":"https://api.github.com/users/Donnerbart/repos","events_url":"https://api.github.com/users/Donnerbart/events{/privacy}","received_events_url":"https://api.github.com/users/Donnerbart/received_events","type":"User","site_admin":false},"body":"Test was chosen because of:\r\n```\r\nAddRemoveListenerICacheTest.java:111:29: Inner assignments should be avoided.\r\nAddRemoveListenerICacheTest.java:118:36: Inner assignments should be avoided.\r\nAddRemoveListenerICacheTest.java:122:36: Inner assignments should be avoided.\r\nAddRemoveListenerICacheTest.java:125:36: Inner assignments should be avoided.\r\n```","created_at":"2015-04-29T06:56:40Z","updated_at":"2015-05-12T16:07:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7840c58abe79dc644a587b67376cd027b626a605","assignee":{"login":"Donnerbart","id":4196298,"avatar_url":"https://avatars.githubusercontent.com/u/4196298?v=3","gravatar_id":"","url":"https://api.github.com/users/Donnerbart","html_url":"https://github.com/Donnerbart","followers_url":"https://api.github.com/users/Donnerbart/followers","following_url":"https://api.github.com/users/Donnerbart/following{/other_user}","gists_url":"https://api.github.com/users/Donnerbart/gists{/gist_id}","starred_url":"https://api.github.com/users/Donnerbart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Donnerbart/subscriptions","organizations_url":"https://api.github.com/users/Donnerbart/orgs","repos_url":"https://api.github.com/users/Donnerbart/repos","events_url":"https://api.github.com/users/Donnerbart/events{/privacy}","received_events_url":"https://api.github.com/users/Donnerbart/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/milestones/7","html_url":"https://github.com/hazelcast/hazelcast-simulator/milestones/0.6","labels_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/milestones/7/labels","id":1090010,"number":7,"title":"0.6","description":"","creator":{"login":"Donnerbart","id":4196298,"avatar_url":"https://avatars.githubusercontent.com/u/4196298?v=3","gravatar_id":"","url":"https://api.github.com/users/Donnerbart","html_url":"https://github.com/Donnerbart","followers_url":"https://api.github.com/users/Donnerbart/followers","following_url":"https://api.github.com/users/Donnerbart/following{/other_user}","gists_url":"https://api.github.com/users/Donnerbart/gists{/gist_id}","starred_url":"https://api.github.com/users/Donnerbart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Donnerbart/subscriptions","organizations_url":"https://api.github.com/users/Donnerbart/orgs","repos_url":"https://api.github.com/users/Donnerbart/repos","events_url":"https://api.github.com/users/Donnerbart/events{/privacy}","received_events_url":"https://api.github.com/users/Donnerbart/received_events","type":"User","site_admin":false},"open_issues":35,"closed_issues":0,"state":"open","created_at":"2015-04-29T21:50:14Z","updated_at":"2015-05-12T10:36:12Z","due_on":"2015-05-31T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/622/commits","review_comments_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/622/comments","review_comment_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/issues/622/comments","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/statuses/7a8b91480506514b3bfdf3441a4b46019d5d86f6","head":{"label":"Donnerbart:cleanupAddRemoveListenerICacheTest","ref":"cleanupAddRemoveListenerICacheTest","sha":"7a8b91480506514b3bfdf3441a4b46019d5d86f6","user":{"login":"Donnerbart","id":4196298,"avatar_url":"https://avatars.githubusercontent.com/u/4196298?v=3","gravatar_id":"","url":"https://api.github.com/users/Donnerbart","html_url":"https://github.com/Donnerbart","followers_url":"https://api.github.com/users/Donnerbart/followers","following_url":"https://api.github.com/users/Donnerbart/following{/other_user}","gists_url":"https://api.github.com/users/Donnerbart/gists{/gist_id}","starred_url":"https://api.github.com/users/Donnerbart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Donnerbart/subscriptions","organizations_url":"https://api.github.com/users/Donnerbart/orgs","repos_url":"https://api.github.com/users/Donnerbart/repos","events_url":"https://api.github.com/users/Donnerbart/events{/privacy}","received_events_url":"https://api.github.com/users/Donnerbart/received_events","type":"User","site_admin":false},"repo":{"id":26756293,"name":"hazelcast-simulator","full_name":"Donnerbart/hazelcast-simulator","owner":{"login":"Donnerbart","id":4196298,"avatar_url":"https://avatars.githubusercontent.com/u/4196298?v=3","gravatar_id":"","url":"https://api.github.com/users/Donnerbart","html_url":"https://github.com/Donnerbart","followers_url":"https://api.github.com/users/Donnerbart/followers","following_url":"https://api.github.com/users/Donnerbart/following{/other_user}","gists_url":"https://api.github.com/users/Donnerbart/gists{/gist_id}","starred_url":"https://api.github.com/users/Donnerbart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Donnerbart/subscriptions","organizations_url":"https://api.github.com/users/Donnerbart/orgs","repos_url":"https://api.github.com/users/Donnerbart/repos","events_url":"https://api.github.com/users/Donnerbart/events{/privacy}","received_events_url":"https://api.github.com/users/Donnerbart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Donnerbart/hazelcast-simulator","description":"A tool for stress testing Hazelcast","fork":true,"url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator","forks_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/forks","keys_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/teams","hooks_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/hooks","issue_events_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/issues/events{/number}","events_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/events","assignees_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/assignees{/user}","branches_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/branches{/branch}","tags_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/tags","blobs_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/git/refs{/sha}","trees_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/statuses/{sha}","languages_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/languages","stargazers_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/stargazers","contributors_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/contributors","subscribers_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/subscribers","subscription_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/subscription","commits_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/commits{/sha}","git_commits_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/git/commits{/sha}","comments_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/comments{/number}","issue_comment_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/issues/comments{/number}","contents_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/contents/{+path}","compare_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/merges","archive_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/downloads","issues_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/issues{/number}","pulls_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/pulls{/number}","milestones_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/milestones{/number}","notifications_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/labels{/name}","releases_url":"https://api.github.com/repos/Donnerbart/hazelcast-simulator/releases{/id}","created_at":"2014-11-17T12:48:31Z","updated_at":"2015-05-08T18:04:25Z","pushed_at":"2015-05-12T15:23:55Z","git_url":"git://github.com/Donnerbart/hazelcast-simulator.git","ssh_url":"git@github.com:Donnerbart/hazelcast-simulator.git","clone_url":"https://github.com/Donnerbart/hazelcast-simulator.git","svn_url":"https://github.com/Donnerbart/hazelcast-simulator","homepage":null,"size":10712,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"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":"2cd2b5f6ec58a86e6287b392c74fa48435067f3e","user":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars.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":11445479,"name":"hazelcast-simulator","full_name":"hazelcast/hazelcast-simulator","owner":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars.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-simulator","description":"A tool for stress testing Hazelcast","fork":false,"url":"https://api.github.com/repos/hazelcast/hazelcast-simulator","forks_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/forks","keys_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/teams","hooks_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/hooks","issue_events_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/issues/events{/number}","events_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/events","assignees_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/assignees{/user}","branches_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/branches{/branch}","tags_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/tags","blobs_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/git/refs{/sha}","trees_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/statuses/{sha}","languages_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/languages","stargazers_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/stargazers","contributors_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/contributors","subscribers_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/subscribers","subscription_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/subscription","commits_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/commits{/sha}","git_commits_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/git/commits{/sha}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/comments{/number}","issue_comment_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/issues/comments{/number}","contents_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/contents/{+path}","compare_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/merges","archive_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/downloads","issues_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/issues{/number}","pulls_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls{/number}","milestones_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/milestones{/number}","notifications_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/labels{/name}","releases_url":"https://api.github.com/repos/hazelcast/hazelcast-simulator/releases{/id}","created_at":"2013-07-16T09:18:54Z","updated_at":"2015-05-08T17:56:18Z","pushed_at":"2015-05-12T16:02:30Z","git_url":"git://github.com/hazelcast/hazelcast-simulator.git","ssh_url":"git@github.com:hazelcast/hazelcast-simulator.git","clone_url":"https://github.com/hazelcast/hazelcast-simulator.git","svn_url":"https://github.com/hazelcast/hazelcast-simulator","homepage":null,"size":16322,"stargazers_count":17,"watchers_count":17,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":97,"forks":16,"open_issues":97,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/622"},"html":{"href":"https://github.com/hazelcast/hazelcast-simulator/pull/622"},"issue":{"href":"https://api.github.com/repos/hazelcast/hazelcast-simulator/issues/622"},"comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast-simulator/issues/622/comments"},"review_comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/622/comments"},"review_comment":{"href":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hazelcast/hazelcast-simulator/pulls/622/commits"},"statuses":{"href":"https://api.github.com/repos/hazelcast/hazelcast-simulator/statuses/7a8b91480506514b3bfdf3441a4b46019d5d86f6"}}}}