You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ji...@apache.org on 2016/03/14 23:03:45 UTC

incubator-geode git commit: GEODE-17: fix tests

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-17-2 5669aefdd -> ea8beec02


GEODE-17: fix tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ea8beec0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ea8beec0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ea8beec0

Branch: refs/heads/feature/GEODE-17-2
Commit: ea8beec020b68c13edc92bc1c5f0ce390800711c
Parents: 5669aef
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Mon Mar 14 15:03:31 2016 -0700
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Mon Mar 14 15:03:31 2016 -0700

----------------------------------------------------------------------
 .../internal/security/MBeanSecurityJUnitTest.java       | 12 ++++++++++++
 .../management/internal/security/cacheServer.json       |  2 --
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ea8beec0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
index 5944363..319fd8a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
@@ -18,6 +18,8 @@ package com.gemstone.gemfire.management.internal.security;
 
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.management.ManagementException;
+import com.gemstone.gemfire.management.ManagementService;
+import com.gemstone.gemfire.management.MemberMXBean;
 import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import org.junit.ClassRule;
@@ -101,5 +103,15 @@ public class MBeanSecurityJUnitTest {
         () -> adapter.registerMBean(mock(DynamicMBean.class), new ObjectName("MockDomain", "name", "mock"), false)
     ).isInstanceOf(ManagementException.class);
 
+
+  }
+
+  @Test
+  @JMXConnectionConfiguration(user = "stranger", password = "1234567")
+  public void testServerSideCalls(){
+    // calls through ManagementService is not using the MBeanServerWrapper.
+    ManagementService service = ManagementService.getManagementService(serverRule.getCache());
+    MemberMXBean bean = service.getMemberMXBean();
+    bean.compactAllDiskStores();
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ea8beec0/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/security/cacheServer.json
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/security/cacheServer.json b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/security/cacheServer.json
index 3385403..092767d 100644
--- a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/security/cacheServer.json
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/security/cacheServer.json
@@ -3,11 +3,9 @@
     {
       "name": "everything",
       "operationsAllowed": [
-        "DEFAULT:LIST_DS",
         "DISTRIBUTED_SYSTEM:LIST_DS",
         "INDEX:DESTROY",
         "QUERY:EXECUTE",
-        "DEFAULT:LOCATE_ENTRY",
         "CONTINUOUS_QUERY:EXECUTE",
         "CONTINUOUS_QUERY:STOP",
         "MEMBER:SHUTDOWN",