{"action":"created","comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments/138588054","pull_request_review_id":62399656,"id":138588054,"diff_hunk":"@@ -114,6 +117,62 @@ public void whenStrategyClassNameNotExist_thenFailFast() {\n     }\n \n     @Test\n+    public void givenDiscoveryStrategyFactoryExistOnClassPath_whenTheSameFactoryIsConfiguredExplicitly_thenOnlyOneInstanceOfStrategyIsCreated() {\n+        Config config = new Config();\n+        config.setProperty(GroupProperty.DISCOVERY_SPI_ENABLED.getName(), \"true\");\n+\n+        JoinConfig join = config.getNetworkConfig().getJoin();\n+        join.getMulticastConfig().setEnabled(false);\n+        DiscoveryConfig discoveryConfig = join.getDiscoveryConfig();\n+\n+        DiscoveryStrategyConfig strategyConfig = new DiscoveryStrategyConfig(new ParametrizedDiscoveryStrategyFactory());\n+        strategyConfig.addProperty(\"bool-property\", true);\n+        discoveryConfig.addDiscoveryStrategyConfig(strategyConfig);\n+\n+        createHazelcastInstance(config);\n+    }","path":"hazelcast/src/test/java/com/hazelcast/spi/discovery/DiscoverySpiTest.java","position":28,"original_position":28,"commit_id":"c8b284daf7bedbf6dc2dbcbaf15741f5add6ba1b","original_commit_id":"c8b284daf7bedbf6dc2dbcbaf15741f5add6ba1b","user":{"login":"Donnerbart","id":4196298,"avatar_url":"https://avatars3.githubusercontent.com/u/4196298?v=4","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":"Are we missing the assertion on the `INSTANCE_COUNTER` here? I see no check of anything, beside no exception is thrown.","created_at":"2017-09-13T11:02:06Z","updated_at":"2017-09-13T11:02:10Z","html_url":"https://github.com/hazelcast/hazelcast/pull/11351#discussion_r138588054","pull_request_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/11351","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments/138588054"},"html":{"href":"https://github.com/hazelcast/hazelcast/pull/11351#discussion_r138588054"},"pull_request":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/11351"}}},"pull_request":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/11351","id":140793163,"html_url":"https://github.com/hazelcast/hazelcast/pull/11351","diff_url":"https://github.com/hazelcast/hazelcast/pull/11351.diff","patch_url":"https://github.com/hazelcast/hazelcast/pull/11351.patch","issue_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/11351","number":11351,"state":"open","locked":false,"title":"Add test checking how many instances of Discovery Strategies were created","user":{"login":"jerrinot","id":158619,"avatar_url":"https://avatars1.githubusercontent.com/u/158619?v=4","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":"There was a bug when a discovery strategy factory was auto-registered via\r\nMETA-INF/service/* and the same strategy factory was  also explicitly\r\nconfigured then Hazelcast would have created 2 instances of the same strategy.\r\n\r\nThis bug was fixed as a side-effect of https://github.com/hazelcast/hazelcast/pull/11121\r\nThis PR is just adding an explicit test","created_at":"2017-09-13T10:53:24Z","updated_at":"2017-09-13T11:02:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce73d33991f74448a1218f2c56ab646e7218af44","assignee":null,"assignees":[],"requested_reviewers":[{"login":"noctarius","id":1142801,"avatar_url":"https://avatars3.githubusercontent.com/u/1142801?v=4","gravatar_id":"","url":"https://api.github.com/users/noctarius","html_url":"https://github.com/noctarius","followers_url":"https://api.github.com/users/noctarius/followers","following_url":"https://api.github.com/users/noctarius/following{/other_user}","gists_url":"https://api.github.com/users/noctarius/gists{/gist_id}","starred_url":"https://api.github.com/users/noctarius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noctarius/subscriptions","organizations_url":"https://api.github.com/users/noctarius/orgs","repos_url":"https://api.github.com/users/noctarius/repos","events_url":"https://api.github.com/users/noctarius/events{/privacy}","received_events_url":"https://api.github.com/users/noctarius/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://avatars3.githubusercontent.com/u/8373100?v=4","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":51,"closed_issues":962,"state":"open","created_at":"2016-11-30T08:32:28Z","updated_at":"2017-09-13T10:53:24Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/11351/commits","review_comments_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/11351/comments","review_comment_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/11351/comments","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast/statuses/c8b284daf7bedbf6dc2dbcbaf15741f5add6ba1b","head":{"label":"jerrinot:improvements/discovery-spi-test-for-instance-count/master","ref":"improvements/discovery-spi-test-for-instance-count/master","sha":"c8b284daf7bedbf6dc2dbcbaf15741f5add6ba1b","user":{"login":"jerrinot","id":158619,"avatar_url":"https://avatars1.githubusercontent.com/u/158619?v=4","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},"repo":{"id":14844579,"name":"hazelcast","full_name":"jerrinot/hazelcast","owner":{"login":"jerrinot","id":158619,"avatar_url":"https://avatars1.githubusercontent.com/u/158619?v=4","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},"private":false,"html_url":"https://github.com/jerrinot/hazelcast","description":"Open Source In-Memory Data Grid","fork":true,"url":"https://api.github.com/repos/jerrinot/hazelcast","forks_url":"https://api.github.com/repos/jerrinot/hazelcast/forks","keys_url":"https://api.github.com/repos/jerrinot/hazelcast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jerrinot/hazelcast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jerrinot/hazelcast/teams","hooks_url":"https://api.github.com/repos/jerrinot/hazelcast/hooks","issue_events_url":"https://api.github.com/repos/jerrinot/hazelcast/issues/events{/number}","events_url":"https://api.github.com/repos/jerrinot/hazelcast/events","assignees_url":"https://api.github.com/repos/jerrinot/hazelcast/assignees{/user}","branches_url":"https://api.github.com/repos/jerrinot/hazelcast/branches{/branch}","tags_url":"https://api.github.com/repos/jerrinot/hazelcast/tags","blobs_url":"https://api.github.com/repos/jerrinot/hazelcast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jerrinot/hazelcast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jerrinot/hazelcast/git/refs{/sha}","trees_url":"https://api.github.com/repos/jerrinot/hazelcast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jerrinot/hazelcast/statuses/{sha}","languages_url":"https://api.github.com/repos/jerrinot/hazelcast/languages","stargazers_url":"https://api.github.com/repos/jerrinot/hazelcast/stargazers","contributors_url":"https://api.github.com/repos/jerrinot/hazelcast/contributors","subscribers_url":"https://api.github.com/repos/jerrinot/hazelcast/subscribers","subscription_url":"https://api.github.com/repos/jerrinot/hazelcast/subscription","commits_url":"https://api.github.com/repos/jerrinot/hazelcast/commits{/sha}","git_commits_url":"https://api.github.com/repos/jerrinot/hazelcast/git/commits{/sha}","comments_url":"https://api.github.com/repos/jerrinot/hazelcast/comments{/number}","issue_comment_url":"https://api.github.com/repos/jerrinot/hazelcast/issues/comments{/number}","contents_url":"https://api.github.com/repos/jerrinot/hazelcast/contents/{+path}","compare_url":"https://api.github.com/repos/jerrinot/hazelcast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jerrinot/hazelcast/merges","archive_url":"https://api.github.com/repos/jerrinot/hazelcast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jerrinot/hazelcast/downloads","issues_url":"https://api.github.com/repos/jerrinot/hazelcast/issues{/number}","pulls_url":"https://api.github.com/repos/jerrinot/hazelcast/pulls{/number}","milestones_url":"https://api.github.com/repos/jerrinot/hazelcast/milestones{/number}","notifications_url":"https://api.github.com/repos/jerrinot/hazelcast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jerrinot/hazelcast/labels{/name}","releases_url":"https://api.github.com/repos/jerrinot/hazelcast/releases{/id}","deployments_url":"https://api.github.com/repos/jerrinot/hazelcast/deployments","created_at":"2013-12-01T19:18:56Z","updated_at":"2015-04-27T20:28:12Z","pushed_at":"2017-09-13T10:52:30Z","git_url":"git://github.com/jerrinot/hazelcast.git","ssh_url":"git@github.com:jerrinot/hazelcast.git","clone_url":"https://github.com/jerrinot/hazelcast.git","svn_url":"https://github.com/jerrinot/hazelcast","homepage":"www.hazelcast.com","size":116219,"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":"9d5e318fd3285935cc8dea41ee9f871c7dfa5f14","user":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars2.githubusercontent.com/u/1453152?v=4","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://avatars2.githubusercontent.com/u/1453152?v=4","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-09-13T03:49:04Z","pushed_at":"2017-09-13T10:57:33Z","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":115839,"stargazers_count":2212,"watchers_count":2212,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":919,"mirror_url":null,"open_issues_count":590,"forks":919,"open_issues":590,"watchers":2212,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/11351"},"html":{"href":"https://github.com/hazelcast/hazelcast/pull/11351"},"issue":{"href":"https://api.github.com/repos/hazelcast/hazelcast/issues/11351"},"comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast/issues/11351/comments"},"review_comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/11351/comments"},"review_comment":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/11351/commits"},"statuses":{"href":"https://api.github.com/repos/hazelcast/hazelcast/statuses/c8b284daf7bedbf6dc2dbcbaf15741f5add6ba1b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Donnerbart"}}