{"action":"created","comment":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/85071402","pull_request_review_id":5807534,"id":85071402,"diff_hunk":"@@ -0,0 +1,184 @@\n+package org.infinispan.server.test.jcache;\n+\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertNotNull;\n+import static org.junit.Assert.assertTrue;\n+\n+import java.lang.management.ManagementFactory;\n+import java.util.Set;\n+import java.util.stream.Collectors;\n+import java.util.stream.StreamSupport;\n+\n+import javax.cache.Cache;\n+import javax.cache.CacheManager;\n+import javax.cache.Caching;\n+import javax.cache.spi.CachingProvider;\n+import javax.management.MBeanServer;\n+import javax.management.ObjectName;\n+\n+import org.infinispan.arquillian.core.InfinispanResource;\n+import org.infinispan.arquillian.core.RemoteInfinispanServer;\n+import org.infinispan.arquillian.core.RunningServer;\n+import org.infinispan.arquillian.core.WithRunningServer;\n+import org.infinispan.client.hotrod.RemoteCache;\n+import org.infinispan.client.hotrod.RemoteCacheManager;\n+import org.infinispan.client.hotrod.configuration.Configuration;\n+import org.infinispan.client.hotrod.configuration.ConfigurationBuilder;\n+import org.jboss.arquillian.junit.Arquillian;\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+\n+/**\n+ * Test for issues related to ISPN-6574\n+ * \n+ * Test check whether JCache API is aware of caches defined in Infinispan server\n+ * configuration\n+ * \n+ * Three tested functionalities are not yet implemented (not part of the\n+ * original ticket), fix pending in <b>ISPN-7095</b>\n+ * \n+ * Calling getCache on a cache will refresh that cache inside CacheManager,\n+ * making the other functionality work ok for that particular cache (hence the\n+ * separate caches for each test)\n+ * \n+ * @author zhostasa\n+ *\n+ */\n+@RunWith(Arquillian.class)\n+@WithRunningServer({ @RunningServer(name = \"cachecontainer\") })\n+public class JCacheStateAwarenessIT {\n+\n+   private static final String enableStatisticsTestCacheName = \"enableStatisticsTestCache\";\n+   private static final String enableManagementTestCacheName = \"enableManagementTestCache\";\n+   private static final String getCacheNamesTestCacheName = \"getCacheNamesTestCache\";\n+   private static final String getCacheTestCacheName = \"getCacheTestCache\";\n+\n+   private static final String testKey = \"testKey\";\n+   private static final String testValue = \"testValue\";\n+\n+   final int managementPort = 9999;\n+\n+   @InfinispanResource(\"cachecontainer\")\n+   private RemoteInfinispanServer server1;\n+   private RemoteCacheManager rcm1;\n+\n+   private CachingProvider jcacheProvider;\n+   private CacheManager cacheManager;\n+   private MBeanServer mBeanServer;\n+\n+   @Before\n+   public void setUp() {\n+      if (rcm1 == null) {\n+         Configuration conf = new ConfigurationBuilder().addServer()\n+               .host(server1.getHotrodEndpoint().getInetAddress().getHostName())\n+               .port(server1.getHotrodEndpoint().getPort()).build();\n+\n+         rcm1 = new RemoteCacheManager(conf);\n+\n+         jcacheProvider = Caching.getCachingProvider(\"org.infinispan.jcache.remote.JCachingProvider\");\n+         cacheManager = jcacheProvider.getCacheManager();\n+\n+         mBeanServer = ManagementFactory.getPlatformMBeanServer();\n+\n+      }\n+   }\n+\n+   /**\n+    * Test enableStatistics command on JCache API <br>\n+    * <br>\n+    * Fix pending in <b>ISPN-7095</b>, needs to be uncommented when implemented\n+    * \n+    */\n+   // @Test\n+   public void testEnableStatistics() throws Exception {\n+      String mBeanName = getMBeanName(enableStatisticsTestCacheName);","path":"server/integration/testsuite/src/test/java/org/infinispan/server/test/jcache/JCacheStateAwarenessIT.java","position":95,"original_position":95,"commit_id":"84986b3f278d5bcc47ebdc0e9fc6f8316a4dd547","original_commit_id":"84986b3f278d5bcc47ebdc0e9fc6f8316a4dd547","user":{"login":"zhostasa","id":20790596,"avatar_url":"https://avatars.githubusercontent.com/u/20790596?v=3","gravatar_id":"","url":"https://api.github.com/users/zhostasa","html_url":"https://github.com/zhostasa","followers_url":"https://api.github.com/users/zhostasa/followers","following_url":"https://api.github.com/users/zhostasa/following{/other_user}","gists_url":"https://api.github.com/users/zhostasa/gists{/gist_id}","starred_url":"https://api.github.com/users/zhostasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhostasa/subscriptions","organizations_url":"https://api.github.com/users/zhostasa/orgs","repos_url":"https://api.github.com/users/zhostasa/repos","events_url":"https://api.github.com/users/zhostasa/events{/privacy}","received_events_url":"https://api.github.com/users/zhostasa/received_events","type":"User","site_admin":false},"body":"I swapped the order on enableStatistics so enableManagement can't interfere with the first invocation, need enableManagement though to confirm statics are enabled","created_at":"2016-10-26T08:24:45Z","updated_at":"2016-10-26T08:24:45Z","html_url":"https://github.com/infinispan/infinispan/pull/4609#discussion_r85071402","pull_request_url":"https://api.github.com/repos/infinispan/infinispan/pulls/4609","_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/85071402"},"html":{"href":"https://github.com/infinispan/infinispan/pull/4609#discussion_r85071402"},"pull_request":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/4609"}}},"pull_request":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/4609","id":88646207,"html_url":"https://github.com/infinispan/infinispan/pull/4609","diff_url":"https://github.com/infinispan/infinispan/pull/4609.diff","patch_url":"https://github.com/infinispan/infinispan/pull/4609.patch","issue_url":"https://api.github.com/repos/infinispan/infinispan/issues/4609","number":4609,"state":"open","locked":false,"title":"ISPN-6574 New IT JCacheStateAwarenessIT","user":{"login":"zhostasa","id":20790596,"avatar_url":"https://avatars.githubusercontent.com/u/20790596?v=3","gravatar_id":"","url":"https://api.github.com/users/zhostasa","html_url":"https://github.com/zhostasa","followers_url":"https://api.github.com/users/zhostasa/followers","following_url":"https://api.github.com/users/zhostasa/following{/other_user}","gists_url":"https://api.github.com/users/zhostasa/gists{/gist_id}","starred_url":"https://api.github.com/users/zhostasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhostasa/subscriptions","organizations_url":"https://api.github.com/users/zhostasa/orgs","repos_url":"https://api.github.com/users/zhostasa/repos","events_url":"https://api.github.com/users/zhostasa/events{/privacy}","received_events_url":"https://api.github.com/users/zhostasa/received_events","type":"User","site_admin":false},"body":"Created new IT JCacheStateAwarenessIT to verify \r\nhttps://issues.jboss.org/browse/ISPN-6574\r\nThe new test has three additional tests commented out, these should be addressed in \r\nhttps://issues.jboss.org/browse/ISPN-7095\r\nand uncommented later\r\n\r\nInfinispan-remote dependency had to be removed from POM (no apparent impact on test results) due to clash with other dependencies (similar to ISPN-5193)","created_at":"2016-10-10T11:22:50Z","updated_at":"2016-10-26T08:24:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b9a7eb393fa2d4177c0ad7d552127412aacaaec","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/infinispan/infinispan/pulls/4609/commits","review_comments_url":"https://api.github.com/repos/infinispan/infinispan/pulls/4609/comments","review_comment_url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/infinispan/infinispan/issues/4609/comments","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/84986b3f278d5bcc47ebdc0e9fc6f8316a4dd547","head":{"label":"zhostasa:ISPN-6574","ref":"ISPN-6574","sha":"84986b3f278d5bcc47ebdc0e9fc6f8316a4dd547","user":{"login":"zhostasa","id":20790596,"avatar_url":"https://avatars.githubusercontent.com/u/20790596?v=3","gravatar_id":"","url":"https://api.github.com/users/zhostasa","html_url":"https://github.com/zhostasa","followers_url":"https://api.github.com/users/zhostasa/followers","following_url":"https://api.github.com/users/zhostasa/following{/other_user}","gists_url":"https://api.github.com/users/zhostasa/gists{/gist_id}","starred_url":"https://api.github.com/users/zhostasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhostasa/subscriptions","organizations_url":"https://api.github.com/users/zhostasa/orgs","repos_url":"https://api.github.com/users/zhostasa/repos","events_url":"https://api.github.com/users/zhostasa/events{/privacy}","received_events_url":"https://api.github.com/users/zhostasa/received_events","type":"User","site_admin":false},"repo":{"id":64739878,"name":"infinispan","full_name":"zhostasa/infinispan","owner":{"login":"zhostasa","id":20790596,"avatar_url":"https://avatars.githubusercontent.com/u/20790596?v=3","gravatar_id":"","url":"https://api.github.com/users/zhostasa","html_url":"https://github.com/zhostasa","followers_url":"https://api.github.com/users/zhostasa/followers","following_url":"https://api.github.com/users/zhostasa/following{/other_user}","gists_url":"https://api.github.com/users/zhostasa/gists{/gist_id}","starred_url":"https://api.github.com/users/zhostasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhostasa/subscriptions","organizations_url":"https://api.github.com/users/zhostasa/orgs","repos_url":"https://api.github.com/users/zhostasa/repos","events_url":"https://api.github.com/users/zhostasa/events{/privacy}","received_events_url":"https://api.github.com/users/zhostasa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zhostasa/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":true,"url":"https://api.github.com/repos/zhostasa/infinispan","forks_url":"https://api.github.com/repos/zhostasa/infinispan/forks","keys_url":"https://api.github.com/repos/zhostasa/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhostasa/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhostasa/infinispan/teams","hooks_url":"https://api.github.com/repos/zhostasa/infinispan/hooks","issue_events_url":"https://api.github.com/repos/zhostasa/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/zhostasa/infinispan/events","assignees_url":"https://api.github.com/repos/zhostasa/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/zhostasa/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/zhostasa/infinispan/tags","blobs_url":"https://api.github.com/repos/zhostasa/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhostasa/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhostasa/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhostasa/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhostasa/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/zhostasa/infinispan/languages","stargazers_url":"https://api.github.com/repos/zhostasa/infinispan/stargazers","contributors_url":"https://api.github.com/repos/zhostasa/infinispan/contributors","subscribers_url":"https://api.github.com/repos/zhostasa/infinispan/subscribers","subscription_url":"https://api.github.com/repos/zhostasa/infinispan/subscription","commits_url":"https://api.github.com/repos/zhostasa/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhostasa/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhostasa/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhostasa/infinispan/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhostasa/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/zhostasa/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhostasa/infinispan/merges","archive_url":"https://api.github.com/repos/zhostasa/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhostasa/infinispan/downloads","issues_url":"https://api.github.com/repos/zhostasa/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/zhostasa/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/zhostasa/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/zhostasa/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhostasa/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/zhostasa/infinispan/releases{/id}","deployments_url":"https://api.github.com/repos/zhostasa/infinispan/deployments","created_at":"2016-08-02T08:40:52Z","updated_at":"2016-08-02T08:41:10Z","pushed_at":"2016-10-18T07:05:26Z","git_url":"git://github.com/zhostasa/infinispan.git","ssh_url":"git@github.com:zhostasa/infinispan.git","clone_url":"https://github.com/zhostasa/infinispan.git","svn_url":"https://github.com/zhostasa/infinispan","homepage":"http://www.infinispan.org","size":87152,"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":"infinispan:master","ref":"master","sha":"4b57f4229820ff89954f3f0061d4ef10916f6b00","user":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"repo":{"id":1050944,"name":"infinispan","full_name":"infinispan/infinispan","owner":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infinispan/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":false,"url":"https://api.github.com/repos/infinispan/infinispan","forks_url":"https://api.github.com/repos/infinispan/infinispan/forks","keys_url":"https://api.github.com/repos/infinispan/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infinispan/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infinispan/infinispan/teams","hooks_url":"https://api.github.com/repos/infinispan/infinispan/hooks","issue_events_url":"https://api.github.com/repos/infinispan/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/infinispan/infinispan/events","assignees_url":"https://api.github.com/repos/infinispan/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/infinispan/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/infinispan/infinispan/tags","blobs_url":"https://api.github.com/repos/infinispan/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infinispan/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infinispan/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/infinispan/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/infinispan/infinispan/languages","stargazers_url":"https://api.github.com/repos/infinispan/infinispan/stargazers","contributors_url":"https://api.github.com/repos/infinispan/infinispan/contributors","subscribers_url":"https://api.github.com/repos/infinispan/infinispan/subscribers","subscription_url":"https://api.github.com/repos/infinispan/infinispan/subscription","commits_url":"https://api.github.com/repos/infinispan/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/infinispan/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/infinispan/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/infinispan/infinispan/issues/comments{/number}","contents_url":"https://api.github.com/repos/infinispan/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/infinispan/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infinispan/infinispan/merges","archive_url":"https://api.github.com/repos/infinispan/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infinispan/infinispan/downloads","issues_url":"https://api.github.com/repos/infinispan/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/infinispan/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/infinispan/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/infinispan/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infinispan/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/infinispan/infinispan/releases{/id}","deployments_url":"https://api.github.com/repos/infinispan/infinispan/deployments","created_at":"2010-11-04T12:33:19Z","updated_at":"2016-10-24T22:55:38Z","pushed_at":"2016-10-26T07:52:35Z","git_url":"git://github.com/infinispan/infinispan.git","ssh_url":"git@github.com:infinispan/infinispan.git","clone_url":"https://github.com/infinispan/infinispan.git","svn_url":"https://github.com/infinispan/infinispan","homepage":"http://www.infinispan.org","size":105789,"stargazers_count":498,"watchers_count":498,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":367,"mirror_url":null,"open_issues_count":27,"forks":367,"open_issues":27,"watchers":498,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/4609"},"html":{"href":"https://github.com/infinispan/infinispan/pull/4609"},"issue":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/4609"},"comments":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/4609/comments"},"review_comments":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/4609/comments"},"review_comment":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/4609/commits"},"statuses":{"href":"https://api.github.com/repos/infinispan/infinispan/statuses/84986b3f278d5bcc47ebdc0e9fc6f8316a4dd547"}}}}
{"actor":{"display_login":"zhostasa"}}