{"action":"created","comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments/27469257","id":27469257,"diff_hunk":"@@ -0,0 +1,115 @@\n+/*\n+ * Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package com.hazelcast.cache;\n+\n+import com.hazelcast.cache.impl.HazelcastServerCachingProvider;\n+import com.hazelcast.config.Config;\n+import com.hazelcast.config.XmlConfigBuilder;\n+import com.hazelcast.core.Hazelcast;\n+import com.hazelcast.core.HazelcastInstance;\n+import com.hazelcast.test.HazelcastSerialClassRunner;\n+import com.hazelcast.test.HazelcastTestSupport;\n+import com.hazelcast.test.annotation.SlowTest;\n+import org.junit.After;\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.junit.experimental.categories.Category;\n+import org.junit.runner.RunWith;\n+\n+import javax.cache.Cache;\n+import java.net.URISyntaxException;\n+import java.net.URL;\n+import java.util.concurrent.CountDownLatch;\n+\n+\n+@RunWith(HazelcastSerialClassRunner.class)\n+@Category(SlowTest.class)\n+public class CacheCreationTest {\n+\n+    private final URL configUrl1 = getClass().getClassLoader().getResource(\"test-hazelcast-real-jcache.xml\");\n+    Config hzConfig;\n+\n+    @Before\n+    public void init() throws Exception{\n+        Hazelcast.shutdownAll();\n+        XmlConfigBuilder configBuilder = new XmlConfigBuilder(configUrl1.getFile());\n+        hzConfig = configBuilder.build();\n+    }\n+\n+    @After\n+    public void cleanup() throws Exception{\n+        Hazelcast.shutdownAll();\n+    }\n+\n+    @Test\n+    public void creatingASingleCache() throws URISyntaxException {\n+\n+        HazelcastInstance hazelcastInstance = Hazelcast.newHazelcastInstance(hzConfig);\n+        HazelcastServerCachingProvider cachingProvider = HazelcastServerCachingProvider\n+                .createCachingProvider(hazelcastInstance);\n+\n+        Cache<Object, Object> cache = cachingProvider.getCacheManager().getCache(\"xmlCache\" + 1);\n+        cache.get(1);\n+    }\n+\n+\n+    @Test\n+    public void creatingASingleCacheFromMultiProviders() throws URISyntaxException {\n+\n+        int threadCount=4;\n+\n+        final CountDownLatch latch = new CountDownLatch(threadCount);\n+        for (int i = 0; i < threadCount; i++) {\n+            final int finalI = i;\n+            new Thread() {\n+                public void run() {\n+                    HazelcastInstance hazelcastInstance = Hazelcast.newHazelcastInstance(hzConfig);\n+                    HazelcastServerCachingProvider cachingProvider = HazelcastServerCachingProvider","path":"hazelcast/src/test/java/com/hazelcast/cache/CacheCreationTest.java","position":81,"original_position":81,"commit_id":"108d2c363788624ce4435fbb462b196de4339057","original_commit_id":"108d2c363788624ce4435fbb462b196de4339057","user":{"login":"serkan-ozal","id":3143425,"avatar_url":"https://avatars.githubusercontent.com/u/3143425?v=3","gravatar_id":"","url":"https://api.github.com/users/serkan-ozal","html_url":"https://github.com/serkan-ozal","followers_url":"https://api.github.com/users/serkan-ozal/followers","following_url":"https://api.github.com/users/serkan-ozal/following{/other_user}","gists_url":"https://api.github.com/users/serkan-ozal/gists{/gist_id}","starred_url":"https://api.github.com/users/serkan-ozal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serkan-ozal/subscriptions","organizations_url":"https://api.github.com/users/serkan-ozal/orgs","repos_url":"https://api.github.com/users/serkan-ozal/repos","events_url":"https://api.github.com/users/serkan-ozal/events{/privacy}","received_events_url":"https://api.github.com/users/serkan-ozal/received_events","type":"User","site_admin":false},"body":"ok","created_at":"2015-03-31T10:54:50Z","updated_at":"2015-03-31T10:54:50Z","html_url":"https://github.com/hazelcast/hazelcast/pull/4840#discussion_r27469257","pull_request_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/4840","_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments/27469257"},"html":{"href":"https://github.com/hazelcast/hazelcast/pull/4840#discussion_r27469257"},"pull_request":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/4840"}}},"pull_request":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/4840","id":31526612,"html_url":"https://github.com/hazelcast/hazelcast/pull/4840","diff_url":"https://github.com/hazelcast/hazelcast/pull/4840.diff","patch_url":"https://github.com/hazelcast/hazelcast/pull/4840.patch","issue_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4840","number":4840,"state":"open","locked":false,"title":"j cache config tests","user":{"login":"cherednichenko","id":7486878,"avatar_url":"https://avatars.githubusercontent.com/u/7486878?v=3","gravatar_id":"","url":"https://api.github.com/users/cherednichenko","html_url":"https://github.com/cherednichenko","followers_url":"https://api.github.com/users/cherednichenko/followers","following_url":"https://api.github.com/users/cherednichenko/following{/other_user}","gists_url":"https://api.github.com/users/cherednichenko/gists{/gist_id}","starred_url":"https://api.github.com/users/cherednichenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cherednichenko/subscriptions","organizations_url":"https://api.github.com/users/cherednichenko/orgs","repos_url":"https://api.github.com/users/cherednichenko/repos","events_url":"https://api.github.com/users/cherednichenko/events{/privacy}","received_events_url":"https://api.github.com/users/cherednichenko/received_events","type":"User","site_admin":false},"body":"test's for issue #4753 ","created_at":"2015-03-19T14:13:42Z","updated_at":"2015-03-31T10:54:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea226a307458d5b8881406ebc177fde27db50ab2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/4840/commits","review_comments_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/4840/comments","review_comment_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4840/comments","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast/statuses/108d2c363788624ce4435fbb462b196de4339057","head":{"label":"cherednichenko:jcacheConfig2","ref":"jcacheConfig2","sha":"108d2c363788624ce4435fbb462b196de4339057","user":{"login":"cherednichenko","id":7486878,"avatar_url":"https://avatars.githubusercontent.com/u/7486878?v=3","gravatar_id":"","url":"https://api.github.com/users/cherednichenko","html_url":"https://github.com/cherednichenko","followers_url":"https://api.github.com/users/cherednichenko/followers","following_url":"https://api.github.com/users/cherednichenko/following{/other_user}","gists_url":"https://api.github.com/users/cherednichenko/gists{/gist_id}","starred_url":"https://api.github.com/users/cherednichenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cherednichenko/subscriptions","organizations_url":"https://api.github.com/users/cherednichenko/orgs","repos_url":"https://api.github.com/users/cherednichenko/repos","events_url":"https://api.github.com/users/cherednichenko/events{/privacy}","received_events_url":"https://api.github.com/users/cherednichenko/received_events","type":"User","site_admin":false},"repo":{"id":31602019,"name":"hazelcast","full_name":"cherednichenko/hazelcast","owner":{"login":"cherednichenko","id":7486878,"avatar_url":"https://avatars.githubusercontent.com/u/7486878?v=3","gravatar_id":"","url":"https://api.github.com/users/cherednichenko","html_url":"https://github.com/cherednichenko","followers_url":"https://api.github.com/users/cherednichenko/followers","following_url":"https://api.github.com/users/cherednichenko/following{/other_user}","gists_url":"https://api.github.com/users/cherednichenko/gists{/gist_id}","starred_url":"https://api.github.com/users/cherednichenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cherednichenko/subscriptions","organizations_url":"https://api.github.com/users/cherednichenko/orgs","repos_url":"https://api.github.com/users/cherednichenko/repos","events_url":"https://api.github.com/users/cherednichenko/events{/privacy}","received_events_url":"https://api.github.com/users/cherednichenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cherednichenko/hazelcast","description":"Open Source In-Memory Data Grid","fork":true,"url":"https://api.github.com/repos/cherednichenko/hazelcast","forks_url":"https://api.github.com/repos/cherednichenko/hazelcast/forks","keys_url":"https://api.github.com/repos/cherednichenko/hazelcast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cherednichenko/hazelcast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cherednichenko/hazelcast/teams","hooks_url":"https://api.github.com/repos/cherednichenko/hazelcast/hooks","issue_events_url":"https://api.github.com/repos/cherednichenko/hazelcast/issues/events{/number}","events_url":"https://api.github.com/repos/cherednichenko/hazelcast/events","assignees_url":"https://api.github.com/repos/cherednichenko/hazelcast/assignees{/user}","branches_url":"https://api.github.com/repos/cherednichenko/hazelcast/branches{/branch}","tags_url":"https://api.github.com/repos/cherednichenko/hazelcast/tags","blobs_url":"https://api.github.com/repos/cherednichenko/hazelcast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cherednichenko/hazelcast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cherednichenko/hazelcast/git/refs{/sha}","trees_url":"https://api.github.com/repos/cherednichenko/hazelcast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cherednichenko/hazelcast/statuses/{sha}","languages_url":"https://api.github.com/repos/cherednichenko/hazelcast/languages","stargazers_url":"https://api.github.com/repos/cherednichenko/hazelcast/stargazers","contributors_url":"https://api.github.com/repos/cherednichenko/hazelcast/contributors","subscribers_url":"https://api.github.com/repos/cherednichenko/hazelcast/subscribers","subscription_url":"https://api.github.com/repos/cherednichenko/hazelcast/subscription","commits_url":"https://api.github.com/repos/cherednichenko/hazelcast/commits{/sha}","git_commits_url":"https://api.github.com/repos/cherednichenko/hazelcast/git/commits{/sha}","comments_url":"https://api.github.com/repos/cherednichenko/hazelcast/comments{/number}","issue_comment_url":"https://api.github.com/repos/cherednichenko/hazelcast/issues/comments{/number}","contents_url":"https://api.github.com/repos/cherednichenko/hazelcast/contents/{+path}","compare_url":"https://api.github.com/repos/cherednichenko/hazelcast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cherednichenko/hazelcast/merges","archive_url":"https://api.github.com/repos/cherednichenko/hazelcast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cherednichenko/hazelcast/downloads","issues_url":"https://api.github.com/repos/cherednichenko/hazelcast/issues{/number}","pulls_url":"https://api.github.com/repos/cherednichenko/hazelcast/pulls{/number}","milestones_url":"https://api.github.com/repos/cherednichenko/hazelcast/milestones{/number}","notifications_url":"https://api.github.com/repos/cherednichenko/hazelcast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cherednichenko/hazelcast/labels{/name}","releases_url":"https://api.github.com/repos/cherednichenko/hazelcast/releases{/id}","created_at":"2015-03-03T14:20:08Z","updated_at":"2015-03-25T13:28:23Z","pushed_at":"2015-03-25T13:46:30Z","git_url":"git://github.com/cherednichenko/hazelcast.git","ssh_url":"git@github.com:cherednichenko/hazelcast.git","clone_url":"https://github.com/cherednichenko/hazelcast.git","svn_url":"https://github.com/cherednichenko/hazelcast","homepage":"www.hazelcast.com","size":62624,"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":"3c784fa363ae3972e642d7c2aaadfc7ced51e6fe","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":3786237,"name":"hazelcast","full_name":"hazelcast/hazelcast","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","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}","created_at":"2012-03-21T12:25:18Z","updated_at":"2015-03-31T10:54:28Z","pushed_at":"2015-03-31T10:54:27Z","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":"www.hazelcast.com","size":128102,"stargazers_count":1068,"watchers_count":1068,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":510,"mirror_url":null,"open_issues_count":456,"forks":510,"open_issues":456,"watchers":1068,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/4840"},"html":{"href":"https://github.com/hazelcast/hazelcast/pull/4840"},"issue":{"href":"https://api.github.com/repos/hazelcast/hazelcast/issues/4840"},"comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast/issues/4840/comments"},"review_comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/4840/comments"},"review_comment":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/4840/commits"},"statuses":{"href":"https://api.github.com/repos/hazelcast/hazelcast/statuses/108d2c363788624ce4435fbb462b196de4339057"}}}}