geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [28/33] incubator-geode git commit: GEODE-420: Initial Alias defintion and removal of deprecated SSL-ENABLED properties
Date Wed, 15 Jun 2016 16:18:01 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f71350a1/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
index 550a6cb..37f705b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
@@ -39,7 +39,6 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.FixedPartitionAttributes;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
 import com.gemstone.gemfire.cache.RegionShortcut;
@@ -62,7 +61,7 @@ import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 /**
  * This class checks and verifies various data and operations exposed through
  * MemberMXBean interface.
- * 
+ * <p>
  * Goal of the Test : MemberMBean gets created once cache is created. Data like
  * config data and stats are of proper value To check proper federation of
  * MemberMBean including remote ops and remote data access
@@ -74,16 +73,8 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
 
   private final String VERIFY_REMOTE_CONFIG_METHOD = "verifyConfigDataRemote";
 
-  static final String REGION_NAME = "MANAGEMENT_TEST_REGION";
-
-  static final String PARTITIONED_REGION_NAME = "MANAGEMENT_PAR_REGION";
-
-  static final String FIXED_PR_NAME = "MANAGEMENT_FIXED_PR";
-
-  static List<FixedPartitionAttributes> fpaList = new ArrayList<FixedPartitionAttributes>();
-
   static final List<Notification> notifList = new ArrayList<Notification>();
-  
+
   // This must be bigger than the dunit ack-wait-threshold for the revoke
   // tests. The command line is setting the ack-wait-threshold to be
   // 60 seconds.
@@ -91,19 +82,17 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
 
   @Test
   public void testGemFireConfigData() throws Exception {
-     initManagement(false);
-   
+    initManagement(false);
+
     Map<DistributedMember, DistributionConfig> configMap = new HashMap<DistributedMember,
DistributionConfig>();
     for (VM vm : getManagedNodeList()) {
-      Map<DistributedMember, DistributionConfig> configMapMember = (Map<DistributedMember,
DistributionConfig>) vm
-          .invoke(CacheManagementDUnitTest.class, VERIFY_CONFIG_METHOD);
+      Map<DistributedMember, DistributionConfig> configMapMember = (Map<DistributedMember,
DistributionConfig>) vm.invoke(CacheManagementDUnitTest.class, VERIFY_CONFIG_METHOD);
       configMap.putAll(configMapMember);
     }
 
     Object[] args = new Object[1];
     args[0] = configMap;
-    getManagingNode().invoke(
-        CacheManagementDUnitTest.class, VERIFY_REMOTE_CONFIG_METHOD, args);
+    getManagingNode().invoke(CacheManagementDUnitTest.class, VERIFY_REMOTE_CONFIG_METHOD,
args);
   }
 
   /**
@@ -112,18 +101,16 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
   @Test
   public void testMemberMBeanOperations() throws Exception {
     initManagement(false);
-    
+
     for (VM vm : managedNodeList) {
-            
+
       //Do some operations to fill the logs
-      
-      createLocalRegion(vm,"testRegion");
+
+      createLocalRegion(vm, "testRegion");
 
       String log = (String) vm.invoke(() -> CacheManagementDUnitTest.fetchLog());
       assertNotNull(log);
-      LogWriterUtils.getLogWriter().info(
-          "<ExpectedString> Log Of Member is " + log.toString()
-              + "</ExpectedString> ");
+      LogWriterUtils.getLogWriter().info("<ExpectedString> Log Of Member is " + log.toString()
+ "</ExpectedString> ");
 
       vm.invoke(() -> CacheManagementDUnitTest.fetchJVMMetrics());
 
@@ -131,12 +118,11 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
 
       vm.invoke(() -> CacheManagementDUnitTest.shutDownMember());
     }
-    
+
     VM managingNode = getManagingNode();
     Object[] args = new Object[1];
     args[0] = 1;// Only locator member wont be shutdown
-    managingNode.invoke(CacheManagementDUnitTest.class,
-        "assertExpectedMembers", args);
+    managingNode.invoke(CacheManagementDUnitTest.class, "assertExpectedMembers", args);
   }
 
   /**
@@ -146,7 +132,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
   public void testMemberMBeanOpsRemote() throws Exception {
     initManagement(false);
     getManagingNode().invoke(() -> CacheManagementDUnitTest.invokeRemoteOps());
-   }
+  }
 
   /**
    * Creates and starts a manager.
@@ -167,7 +153,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     // Only creates a cache in Managing Node
     // Does not start the manager
     createManagementCache(managingNode);
-    
+
     node3.invoke(() -> CacheManagementDUnitTest.startManager());
 
     // Now start Managing node manager. System will have two Managers now which
@@ -177,7 +163,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     checkManagerView(managingNode, member);
     stopManagingNode(managingNode);
   }
-  
+
   /**
    * Creates and starts a manager.
    * Multiple Managers
@@ -197,16 +183,16 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     // Only creates a cache in Managing Node
     // Does not start the manager
     createManagementCache(managingNode);
-    
+
     startManagingNode(managingNode);
     DistributedMember member = getMember(managingNode);
     checkManagerView(managingNode, member);
     stopManagingNode(managingNode);
     checkNonManagerView(managingNode);
   }
-  
+
   @Test
-  public void testServiceCloseManagedNode() throws Exception{
+  public void testServiceCloseManagedNode() throws Exception {
     List<VM> managedNodeList = getManagedNodeList();
     VM node1 = managedNodeList.get(0);
     VM node2 = managedNodeList.get(1);
@@ -220,15 +206,15 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     // Only creates a cache in Managing Node
     // Does not start the manager
     createManagementCache(managingNode);
-    
+
     node3.invoke(() -> CacheManagementDUnitTest.startManager());
-    
+
     closeCache(node3);
     validateServiceResource(node3);
   }
-  
+
   @Test
-  public void testGetMBean() throws Exception{
+  public void testGetMBean() throws Exception {
     List<VM> managedNodeList = getManagedNodeList();
     VM node1 = managedNodeList.get(0);
     VM node2 = managedNodeList.get(1);
@@ -240,14 +226,14 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     createCache(node3);
 
     createManagementCache(managingNode);
-    
+
     startManagingNode(managingNode);
 
     checkGetMBean(managingNode);
   }
-  
+
   @Test
-  public void testQueryMBeans() throws Exception{
+  public void testQueryMBeans() throws Exception {
     List<VM> managedNodeList = getManagedNodeList();
     VM node1 = managedNodeList.get(0);
     VM node2 = managedNodeList.get(1);
@@ -259,27 +245,24 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     createCache(node3);
 
     createManagementCache(managingNode);
-    
+
     startManagingNode(managingNode);
 
     checkQueryMBeans(managingNode);
   }
 
   protected void checkQueryMBeans(final VM vm) {
-    SerializableRunnable validateServiceResource = new SerializableRunnable(
-        "Check Query MBeans") {
+    SerializableRunnable validateServiceResource = new SerializableRunnable("Check Query
MBeans") {
       public void run() {
         GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
 
-        Set<DistributedMember> otherMembers = cache.getDistributionManager()
-            .getOtherNormalDistributionManagerIds();
-        
+        Set<DistributedMember> otherMembers = cache.getDistributionManager().getOtherNormalDistributionManagerIds();
+
         Set<ObjectName> superSet = new HashSet<ObjectName>();
 
         for (DistributedMember member : otherMembers) {
 
-          ObjectName memberMBeanName = managementService
-              .getMemberMBeanName(member);
+          ObjectName memberMBeanName = managementService.getMemberMBeanName(member);
 
           waitForProxy(memberMBeanName, MemberMXBean.class);
           Set<ObjectName> names = managementService.queryMBeanNames(member);
@@ -288,8 +271,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
 
         }
 
-        Set<ObjectName> names = managementService.queryMBeanNames(cache
-            .getDistributedSystem().getDistributedMember());
+        Set<ObjectName> names = managementService.queryMBeanNames(cache.getDistributedSystem().getDistributedMember());
         assertTrue(!superSet.contains(names));
       }
     };
@@ -298,31 +280,24 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
   }
 
   protected void checkGetMBean(final VM vm) {
-    SerializableRunnable validateServiceResource = new SerializableRunnable(
-        "Check Get MBean") {
+    SerializableRunnable validateServiceResource = new SerializableRunnable("Check Get MBean")
{
       public void run() {
         GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
-        Set<DistributedMember> otherMembers = cache.getDistributionManager()
-            .getOtherNormalDistributionManagerIds();
+        Set<DistributedMember> otherMembers = cache.getDistributionManager().getOtherNormalDistributionManagerIds();
 
         for (DistributedMember member : otherMembers) {
-          
-          ObjectName memberMBeanName = managementService
-              .getMemberMBeanName(member);
-          
+
+          ObjectName memberMBeanName = managementService.getMemberMBeanName(member);
+
           waitForProxy(memberMBeanName, MemberMXBean.class);
-          
-          MemberMXBean bean = managementService.getMBeanInstance(memberMBeanName,
-              MemberMXBean.class);
+
+          MemberMXBean bean = managementService.getMBeanInstance(memberMBeanName, MemberMXBean.class);
           assertNotNull(bean);
         }
 
-        DistributedMember thisMember = cache.getDistributedSystem()
-            .getDistributedMember();
-        ObjectName memberMBeanName = managementService
-            .getMemberMBeanName(thisMember);
-        MemberMXBean bean = managementService.getMBeanInstance(memberMBeanName,
-            MemberMXBean.class);
+        DistributedMember thisMember = cache.getDistributedSystem().getDistributedMember();
+        ObjectName memberMBeanName = managementService.getMemberMBeanName(thisMember);
+        MemberMXBean bean = managementService.getMBeanInstance(memberMBeanName, MemberMXBean.class);
         assertNotNull(bean);
 
       }
@@ -331,28 +306,25 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
   }
 
   protected void validateServiceResource(final VM vm) {
-    SerializableRunnable validateServiceResource = new SerializableRunnable(
-        "Valideate Management Service Resource") {
+    SerializableRunnable validateServiceResource = new SerializableRunnable("Valideate Management
Service Resource") {
       public void run() {
 
         GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
         assertNull(cache);
         assertFalse(managementService.isManager());
-        
-        SystemManagementService service = (SystemManagementService)managementService;
+
+        SystemManagementService service = (SystemManagementService) managementService;
         assertNull(service.getLocalManager());
       }
     };
     vm.invoke(validateServiceResource);
   }
-  
+
   /**
    * Creates a Distributed Region
    */
-  protected AsyncInvocation checkManagerView(final VM vm,
-      final DistributedMember oneManager) {
-    SerializableRunnable createRegion = new SerializableRunnable(
-        "Check Manager View") {
+  protected AsyncInvocation checkManagerView(final VM vm, final DistributedMember oneManager)
{
+    SerializableRunnable createRegion = new SerializableRunnable("Check Manager View") {
       public void run() {
 
         GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
@@ -363,25 +335,24 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
         //Ensure Data getting federated from Managing node
         long t1 = bean.getMemberUpTime();
         try {
-          this.wait(ManagementConstants.REFRESH_TIME *3);
+          this.wait(ManagementConstants.REFRESH_TIME * 3);
         } catch (InterruptedException e) {
           fail("interrupted");
         }
         long t2 = bean.getMemberUpTime();
-        
-        assertTrue(t2>t1);
-        
+
+        assertTrue(t2 > t1);
+
       }
     };
     return vm.invokeAsync(createRegion);
   }
-  
+
   /**
    * Add any Manager clean up asserts here
    */
   protected void checkNonManagerView(final VM vm) {
-    SerializableRunnable checkNonManagerView = new SerializableRunnable(
-        "Check Non Manager View") {
+    SerializableRunnable checkNonManagerView = new SerializableRunnable("Check Non Manager
View") {
       public void run() {
 
         GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
@@ -390,16 +361,13 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
 
         SystemManagementService service = (SystemManagementService) managementService;
         assertTrue(service.getLocalManager().isRunning());
-        assertFalse(service.getLocalManager().getFederationSheduler()
-            .isShutdown());
+        assertFalse(service.getLocalManager().getFederationSheduler().isShutdown());
 
         // Check for Proxies
-        Set<DistributedMember> otherMembers = cache.getDistributionManager()
-            .getOtherNormalDistributionManagerIds();
+        Set<DistributedMember> otherMembers = cache.getDistributionManager().getOtherNormalDistributionManagerIds();
         assertTrue(otherMembers.size() > 0);
         for (DistributedMember member : otherMembers) {
-          Set<ObjectName> proxyNames = service.getFederatingManager()
-              .getProxyFactory().findAllProxies(member);
+          Set<ObjectName> proxyNames = service.getFederatingManager().getProxyFactory().findAllProxies(member);
           assertTrue(proxyNames.isEmpty());
           ObjectName proxyMBeanName = service.getMemberMBeanName(member);
           assertFalse(MBeanJMXAdapter.mbeanServer.isRegistered(proxyMBeanName));
@@ -409,12 +377,11 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     };
     vm.invoke(checkNonManagerView);
   }
-  
+
   public static Map<DistributedMember, DistributionConfig> verifyConfigData() {
     GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
     ManagementService service = getManagementService();
-    DistributionConfig config = ((InternalDistributedSystem) cache
-        .getDistributedSystem()).getConfig();
+    DistributionConfig config = ((InternalDistributedSystem) cache.getDistributedSystem()).getConfig();
     MemberMXBean bean = service.getMemberMXBean();
     GemFireProperties data = bean.listGemFireProperties();
     assertConfigEquals(config, data);
@@ -427,11 +394,9 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
    * This is to check whether the config data has been propagated to the
    * Managing node properly or not.
    */
-  public static void verifyConfigDataRemote(
-      Map<DistributedMember, DistributionConfig> configMap) throws Exception {
+  public static void verifyConfigDataRemote(Map<DistributedMember, DistributionConfig>
configMap) throws Exception {
     GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
-    Set<DistributedMember> otherMemberSet = cache.getDistributionManager()
-        .getOtherNormalDistributionManagerIds();
+    Set<DistributedMember> otherMemberSet = cache.getDistributionManager().getOtherNormalDistributionManagerIds();
 
     for (DistributedMember member : otherMemberSet) {
       MemberMXBean bean = MBeanUtil.getMemberMbeanProxy(member);
@@ -445,23 +410,18 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
    * Asserts that distribution config and gemfireProperty composite types hold
    * the same values
    */
-  public static void assertConfigEquals(DistributionConfig config,
-      GemFireProperties data) {
+  public static void assertConfigEquals(DistributionConfig config, GemFireProperties data)
{
 
     assertEquals(data.getMemberName(), config.getName());
     // **TODO **
     String memberGroups = null;
 
     assertEquals(data.getMcastPort(), config.getMcastPort());
-    assertEquals(data.getMcastAddress(), config.getMcastAddress()
-        .getHostAddress());
+    assertEquals(data.getMcastAddress(), config.getMcastAddress().getHostAddress());
     assertEquals(data.getBindAddress(), config.getBindAddress());
     assertEquals(data.getTcpPort(), config.getTcpPort());
-    assertEquals(removeVMDir(data.getCacheXMLFile()), removeVMDir(config.getCacheXmlFile()
-        .getAbsolutePath()));
+    assertEquals(removeVMDir(data.getCacheXMLFile()), removeVMDir(config.getCacheXmlFile().getAbsolutePath()));
     // **TODO **
-    String configFile = null;
-    String configFile1 = null;
     assertEquals(data.getMcastTTL(), config.getMcastTtl());
     assertEquals(data.getServerBindAddress(), config.getServerBindAddress());
     assertEquals(data.getLocators(), config.getLocators());
@@ -469,44 +429,34 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     assertEquals(removeVMDir(data.getStartLocator()), removeVMDir(config.getStartLocator()));
     assertEquals(removeVMDir(data.getLogFile()), removeVMDir(config.getLogFile().getAbsolutePath()));
     assertEquals(data.getLogLevel(), config.getLogLevel());
-    assertEquals(data.isStatisticSamplingEnabled(), config
-        .getStatisticSamplingEnabled());
-    assertEquals(removeVMDir(data.getStatisticArchiveFile()), removeVMDir(config
-        .getStatisticArchiveFile().getAbsolutePath()));
+    assertEquals(data.isStatisticSamplingEnabled(), config.getStatisticSamplingEnabled());
+    assertEquals(removeVMDir(data.getStatisticArchiveFile()), removeVMDir(config.getStatisticArchiveFile().getAbsolutePath()));
     // ** TODO **
     String includeFile = null;
     assertEquals(data.getAckWaitThreshold(), config.getAckWaitThreshold());
-    assertEquals(data.getAckSevereAlertThreshold(), config
-        .getAckSevereAlertThreshold());
-    assertEquals(data.getArchiveFileSizeLimit(), config
-        .getArchiveFileSizeLimit());
-    assertEquals(data.getArchiveDiskSpaceLimit(), config
-        .getArchiveDiskSpaceLimit());
+    assertEquals(data.getAckSevereAlertThreshold(), config.getAckSevereAlertThreshold());
+    assertEquals(data.getArchiveFileSizeLimit(), config.getArchiveFileSizeLimit());
+    assertEquals(data.getArchiveDiskSpaceLimit(), config.getArchiveDiskSpaceLimit());
     assertEquals(data.getLogFileSizeLimit(), config.getLogFileSizeLimit());
     assertEquals(data.getLogDiskSpaceLimit(), config.getLogDiskSpaceLimit());
-    assertEquals(data.isSslEnabled(), config.getSSLEnabled());
-    assertEquals(data.getSslCiphers(), config.getSSLCiphers());
-    assertEquals(data.getSslProtocols(), config.getSSLProtocols());
-    assertEquals(data.isSslRequireAuthentication(), config
-        .getSSLRequireAuthentication());
+    assertEquals(data.isClusterSSLEnabled(), config.getClusterSSLEnabled());
+
+    assertEquals(data.getClusterSSLCiphers(), config.getClusterSSLCiphers());
+    assertEquals(data.getClusterSSLProtocols(), config.getClusterSSLProtocols());
+    assertEquals(data.isClusterSSLRequireAuthentication(), config.getClusterSSLRequireAuthentication());
     assertEquals(data.getSocketLeaseTime(), config.getSocketLeaseTime());
     assertEquals(data.getSocketBufferSize(), config.getSocketBufferSize());
     assertEquals(data.getMcastSendBufferSize(), config.getMcastSendBufferSize());
     assertEquals(data.getMcastRecvBufferSize(), config.getMcastRecvBufferSize());
-    assertEquals(data.getMcastByteAllowance(), config.getMcastFlowControl()
-        .getByteAllowance());
-    assertEquals(data.getMcastRechargeThreshold(), config.getMcastFlowControl()
-        .getRechargeThreshold(), 0);
-    assertEquals(data.getMcastRechargeBlockMs(), config.getMcastFlowControl()
-        .getRechargeBlockMs());
+    assertEquals(data.getMcastByteAllowance(), config.getMcastFlowControl().getByteAllowance());
+    assertEquals(data.getMcastRechargeThreshold(), config.getMcastFlowControl().getRechargeThreshold(),
0);
+    assertEquals(data.getMcastRechargeBlockMs(), config.getMcastFlowControl().getRechargeBlockMs());
     assertEquals(data.getUdpFragmentSize(), config.getUdpFragmentSize());
     assertEquals(data.getUdpSendBufferSize(), config.getUdpSendBufferSize());
     assertEquals(data.getUdpRecvBufferSize(), config.getUdpRecvBufferSize());
     assertEquals(data.isDisableTcp(), config.getDisableTcp());
-    assertEquals(data.isEnableTimeStatistics(), config
-        .getEnableTimeStatistics());
-    assertEquals(data.isEnableNetworkPartitionDetection(), config
-        .getEnableNetworkPartitionDetection());
+    assertEquals(data.isEnableTimeStatistics(), config.getEnableTimeStatistics());
+    assertEquals(data.isEnableNetworkPartitionDetection(), config.getEnableNetworkPartitionDetection());
     assertEquals(data.getMemberTimeout(), config.getMemberTimeout());
 
     int[] configPortRange = config.getMembershipPortRange();
@@ -518,39 +468,25 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     }
     assertEquals(data.isConserveSockets(), config.getConserveSockets());
     assertEquals(data.getRoles(), config.getRoles());
-    assertEquals(data.getMaxWaitTimeForReconnect(), config
-        .getMaxWaitTimeForReconnect());
-    assertEquals(data.getMaxNumReconnectTries(), config
-        .getMaxNumReconnectTries());
-    assertEquals(data.getAsyncDistributionTimeout(), config
-        .getAsyncDistributionTimeout());
+    assertEquals(data.getMaxWaitTimeForReconnect(), config.getMaxWaitTimeForReconnect());
+    assertEquals(data.getMaxNumReconnectTries(), config.getMaxNumReconnectTries());
+    assertEquals(data.getAsyncDistributionTimeout(), config.getAsyncDistributionTimeout());
     assertEquals(data.getAsyncQueueTimeout(), config.getAsyncQueueTimeout());
     assertEquals(data.getAsyncMaxQueueSize(), config.getAsyncMaxQueueSize());
     assertEquals(data.getClientConflation(), config.getClientConflation());
     assertEquals(data.getDurableClientId(), config.getDurableClientId());
-    assertEquals(data.getDurableClientTimeout(), config
-        .getDurableClientTimeout());
-    assertEquals(data.getSecurityClientAuthInit(), config
-        .getSecurityClientAuthInit());
-    assertEquals(data.getSecurityClientAuthenticator(), config
-        .getSecurityClientAuthenticator());
-    assertEquals(data.getSecurityClientDHAlgo(), config
-        .getSecurityClientDHAlgo());
-    assertEquals(data.getSecurityPeerAuthInit(), config
-        .getSecurityPeerAuthInit());
-    assertEquals(data.getSecurityClientAuthenticator(), config
-        .getSecurityPeerAuthenticator());
-    assertEquals(data.getSecurityClientAccessor(), config
-        .getSecurityClientAccessor());
-    assertEquals(data.getSecurityClientAccessorPP(), config
-        .getSecurityClientAccessorPP());
+    assertEquals(data.getDurableClientTimeout(), config.getDurableClientTimeout());
+    assertEquals(data.getSecurityClientAuthInit(), config.getSecurityClientAuthInit());
+    assertEquals(data.getSecurityClientAuthenticator(), config.getSecurityClientAuthenticator());
+    assertEquals(data.getSecurityClientDHAlgo(), config.getSecurityClientDHAlgo());
+    assertEquals(data.getSecurityPeerAuthInit(), config.getSecurityPeerAuthInit());
+    assertEquals(data.getSecurityClientAuthenticator(), config.getSecurityPeerAuthenticator());
+    assertEquals(data.getSecurityClientAccessor(), config.getSecurityClientAccessor());
+    assertEquals(data.getSecurityClientAccessorPP(), config.getSecurityClientAccessorPP());
     assertEquals(data.getSecurityLogLevel(), config.getSecurityLogLevel());
-    assertEquals(removeVMDir(data.getSecurityLogFile()), removeVMDir(config.getSecurityLogFile()
-        .getAbsolutePath()));
-    assertEquals(data.getSecurityPeerMembershipTimeout(), config
-        .getSecurityPeerMembershipTimeout());
-    assertEquals(data.isRemoveUnresponsiveClient(), config
-        .getRemoveUnresponsiveClient());
+    assertEquals(removeVMDir(data.getSecurityLogFile()), removeVMDir(config.getSecurityLogFile().getAbsolutePath()));
+    assertEquals(data.getSecurityPeerMembershipTimeout(), config.getSecurityPeerMembershipTimeout());
+    assertEquals(data.isRemoveUnresponsiveClient(), config.getRemoveUnresponsiveClient());
     assertEquals(data.isDeltaPropagation(), config.getDeltaPropagation());
     assertEquals(data.getRedundancyZone(), config.getRedundancyZone());
     assertEquals(data.isEnforceUniqueHost(), config.getEnforceUniqueHost());
@@ -562,8 +498,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
   }
 
   public static void startManager() {
-    MemberMXBean bean = getManagementService()
-    .getMemberMXBean();
+    MemberMXBean bean = getManagementService().getMemberMXBean();
     // When the cache is created if jmx-manager is true then we create the manager.
     // So it may already exist when we get here.
     if (!bean.isManagerCreated()) {
@@ -583,52 +518,43 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     assertTrue(getManagementService().isManager());
     assertTrue(bean.isManager());
   }
-  
-  public static void isManager(){
-    MemberMXBean bean = getManagementService()
-    .getMemberMXBean();
-    if(bean.createManager()){
+
+  public static void isManager() {
+    MemberMXBean bean = getManagementService().getMemberMXBean();
+    if (bean.createManager()) {
       ManagerMXBean mngrBean = getManagementService().getManagerMXBean();
       try {
         mngrBean.start();
       } catch (JMException e) {
         fail("Could not start Manager " + e);
       }
-    }else{
+    } else {
       fail(" Could not create Manager");
     }
   }
 
   public static String fetchLog() {
-    MemberMXBean bean = getManagementService()
-        .getMemberMXBean();
+    MemberMXBean bean = getManagementService().getMemberMXBean();
     String log = bean.showLog(30);
     return log;
   }
 
   public static void fetchJVMMetrics() {
-    MemberMXBean bean = getManagementService()
-        .getMemberMXBean();
+    MemberMXBean bean = getManagementService().getMemberMXBean();
     JVMMetrics metrics = bean.showJVMMetrics();
 
-    LogWriterUtils.getLogWriter().info(
-        "<ExpectedString> JVMMetrics is " + metrics.toString()
-            + "</ExpectedString> ");
+    LogWriterUtils.getLogWriter().info("<ExpectedString> JVMMetrics is " + metrics.toString()
+ "</ExpectedString> ");
   }
 
   public static void fetchOSMetrics() {
-    MemberMXBean bean = getManagementService()
-        .getMemberMXBean();
+    MemberMXBean bean = getManagementService().getMemberMXBean();
     OSMetrics metrics = bean.showOSMetrics();
 
-    LogWriterUtils.getLogWriter().info(
-        "<ExpectedString> OSMetrics is " + metrics.toString()
-            + "</ExpectedString> ");
+    LogWriterUtils.getLogWriter().info("<ExpectedString> OSMetrics is " + metrics.toString()
+ "</ExpectedString> ");
   }
 
   public static void shutDownMember() {
-    MemberMXBean bean = getManagementService()
-        .getMemberMXBean();
+    MemberMXBean bean = getManagementService().getMemberMXBean();
     bean.shutDownMember();
   }
 
@@ -640,8 +566,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
 
       public boolean done() {
         GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
-        Set<DistributedMember> setOfOtherMembers = cache.getDistributedSystem()
-            .getAllOtherMembers();
+        Set<DistributedMember> setOfOtherMembers = cache.getDistributedSystem().getAllOtherMembers();
         boolean done = (setOfOtherMembers != null && setOfOtherMembers.size() ==
1);
         return done;
       }
@@ -651,23 +576,16 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
 
   public static void invokeRemoteOps() throws Exception {
     GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
-    Set<DistributedMember> otherMemberSet = cache.getDistributionManager()
-        .getOtherNormalDistributionManagerIds();
+    Set<DistributedMember> otherMemberSet = cache.getDistributionManager().getOtherNormalDistributionManagerIds();
 
     for (DistributedMember member : otherMemberSet) {
       MemberMXBean bean = MBeanUtil.getMemberMbeanProxy(member);
       JVMMetrics metrics = bean.showJVMMetrics();
 
-      LogWriterUtils.getLogWriter().info(
-          "<ExpectedString> JVMMetrics is " + metrics.toString()
-              + "</ExpectedString> ");
-      LogWriterUtils.getLogWriter().info(
-          "<ExpectedString> OSMetrics is " + metrics.toString()
-              + "</ExpectedString> ");
-      
-      LogWriterUtils.getLogWriter().info(
-          "<ExpectedString> Boolean Data Check " +bean.isManager()
-              + "</ExpectedString> ");
+      LogWriterUtils.getLogWriter().info("<ExpectedString> JVMMetrics is " + metrics.toString()
+ "</ExpectedString> ");
+      LogWriterUtils.getLogWriter().info("<ExpectedString> OSMetrics is " + metrics.toString()
+ "</ExpectedString> ");
+
+      LogWriterUtils.getLogWriter().info("<ExpectedString> Boolean Data Check " + bean.isManager()
+ "</ExpectedString> ");
     }
   }
 
@@ -716,7 +634,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     // Step : 3 : Verify Notification count, notification region sizes
     countNotificationsAndCheckRegionSize(node1, node2, node3, managingNode);
   }
-  
+
   @Test
   public void testRedundancyZone() throws Exception {
     List<VM> managedNodeList = getManagedNodeList();
@@ -725,9 +643,9 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     VM node3 = managedNodeList.get(2);
     Properties props = new Properties();
     props.setProperty(REDUNDANCY_ZONE, "ARMY_ZONE");
-    
-    createCache(node1,props);
-    
+
+    createCache(node1, props);
+
     node1.invoke(new SerializableRunnable("Assert Redundancy Zone") {
 
       public void run() {
@@ -766,7 +684,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     };
     vm.invoke(attchListenerToDSMBean);
   }
-  
+
   public void waitForManagerToRegisterListener() {
     SystemManagementService service = (SystemManagementService) getManagementService();
     final Map<ObjectName, NotificationHubListener> hubMap = service.getNotificationHub().getListenerObjectMap();
@@ -794,57 +712,10 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     final String appender2 = MBeanJMXAdapter.getUniqueIDForMember(member2);
     final String appender3 = MBeanJMXAdapter.getUniqueIDForMember(member3);
 
-    node1.invoke(new SerializableRunnable("Create Regions") {
+    node1.invoke("Create Regions", () -> createNotifTestRegion(appender1));
+    node2.invoke("Create Regions", () -> createNotifTestRegion(appender2));
+    node3.invoke("Create Regions", () -> createNotifTestRegion(appender3));
 
-      public void run() {
-
-        Cache cache = getCache();
-
-        waitForManagerToRegisterListener();
-        RegionFactory rf = cache.createRegionFactory(RegionShortcut.REPLICATE);
-        for (int i = 1; i <= 15; i++) {
-          rf.create("NotifTestRegion_"+ i);
-        }
-        Region member1NotifRegion = cache.getRegion(ManagementConstants.NOTIFICATION_REGION
+ "_" + appender1);
-
-        assertEquals(0, member1NotifRegion.size());
-
-      }
-    });
-
-    node2.invoke(new SerializableRunnable("Create Regions") {
-
-      public void run() {
-
-        Cache cache = getCache();
-        waitForManagerToRegisterListener();
-        RegionFactory rf = cache.createRegionFactory(RegionShortcut.REPLICATE);
-        for (int i = 1; i <= 15; i++) {
-          rf.create("NotifTestRegion_" +   i);
-        }
-
-        Region member2NotifRegion = cache.getRegion(ManagementConstants.NOTIFICATION_REGION
+ "_" + appender2);
-
-        assertEquals(0, member2NotifRegion.size());
-      }
-    });
-
-    node3.invoke(new SerializableRunnable("Create Regions") {
-
-      public void run() {
-
-        Cache cache = getCache();
-        waitForManagerToRegisterListener();
-        RegionFactory rf = cache.createRegionFactory(RegionShortcut.REPLICATE);
-        for (int i = 1; i <= 15; i++) {
-          rf.create("NotifTestRegion_" + i);
-        }
-
-        Region member3NotifRegion = cache.getRegion(ManagementConstants.NOTIFICATION_REGION
+ "_" + appender3);
-
-        assertEquals(0, member3NotifRegion.size());
-      }
-    });
     managingNode.invoke(new SerializableRunnable("Validate Notification Count") {
 
       public void run() {
@@ -865,9 +736,9 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
         Cache cache = getCache();
         SystemManagementService service = (SystemManagementService) getManagementService();
 
-        Region member1NotifRegion = cache.getRegion(ManagementConstants.NOTIFICATION_REGION
 + "_" +  appender1);
-        Region member2NotifRegion = cache.getRegion(ManagementConstants.NOTIFICATION_REGION
 + "_" +   appender2);
-        Region member3NotifRegion = cache.getRegion(ManagementConstants.NOTIFICATION_REGION
 + "_" +   appender3);
+        Region member1NotifRegion = cache.getRegion(ManagementConstants.NOTIFICATION_REGION
+ "_" + appender1);
+        Region member2NotifRegion = cache.getRegion(ManagementConstants.NOTIFICATION_REGION
+ "_" + appender2);
+        Region member3NotifRegion = cache.getRegion(ManagementConstants.NOTIFICATION_REGION
+ "_" + appender3);
 
         // Even though we got 15 notification only 10 should be there due to
         // eviction attributes set in notification region
@@ -880,4 +751,17 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
 
   }
 
+  private void createNotifTestRegion(final String appender1) {
+    Cache cache = getCache();
+
+    waitForManagerToRegisterListener();
+    RegionFactory rf = cache.createRegionFactory(RegionShortcut.REPLICATE);
+    for (int i = 1; i <= 15; i++) {
+      rf.create("NotifTestRegion_" + i);
+    }
+    Region member1NotifRegion = cache.getRegion(ManagementConstants.NOTIFICATION_REGION +
"_" + appender1);
+
+    assertEquals(0, member1NotifRegion.size());
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f71350a1/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
index 5457ed3..6d3079c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
@@ -860,10 +860,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     final Properties serverProperties = getSystem().getProperties();
 
     //Below removed properties are already got copied as cluster SSL properties 
-    serverProperties.remove(SSL_ENABLED);
-    serverProperties.remove(SSL_CIPHERS);
-    serverProperties.remove(SSL_PROTOCOLS);
-    serverProperties.remove(SSL_REQUIRE_AUTHENTICATION);
+    serverProperties.remove(CLUSTER_SSL_ENABLED);
+    serverProperties.remove(CLUSTER_SSL_CIPHERS);
+    serverProperties.remove(CLUSTER_SSL_PROTOCOLS);
+    serverProperties.remove(CLUSTER_SSL_REQUIRE_AUTHENTICATION);
 
     getLogWriter().info("[doTestSystemClientEventsInServer] ports[0]=" + ports[0]);
     getLogWriter().info("[doTestSystemClientEventsInServer] serverMemberId=" + serverMemberId);
@@ -1556,10 +1556,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     final String serverMemberId = serverMember.toString();
     final Properties serverProperties = getSystem().getProperties();
 
-    serverProperties.remove(SSL_ENABLED);
-    serverProperties.remove(SSL_CIPHERS);
-    serverProperties.remove(SSL_PROTOCOLS);
-    serverProperties.remove(SSL_REQUIRE_AUTHENTICATION);
+    serverProperties.remove(CLUSTER_SSL_ENABLED);
+    serverProperties.remove(CLUSTER_SSL_CIPHERS);
+    serverProperties.remove(CLUSTER_SSL_PROTOCOLS);
+    serverProperties.remove(CLUSTER_SSL_REQUIRE_AUTHENTICATION);
     
     getLogWriter().info("[testServerEventsInPeerSystem] ports[0]=" + ports[0]);
     getLogWriter().info("[testServerEventsInPeerSystem] serverMemberId=" + serverMemberId);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f71350a1/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
index 7a96adf..b14a3d7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
@@ -101,12 +101,12 @@ public class HTTPServiceSSLSupportJUnitTest {
 
     Properties localProps = new Properties();
     localProps.setProperty(MCAST_PORT, "0");
-    localProps.setProperty(SSL_ENABLED, "true");
+    localProps.setProperty(CLUSTER_SSL_ENABLED, "true");
     System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.keyStore", jks.getCanonicalPath());
     System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.keyStorePassword",
"password");
 
-    localProps.setProperty(SSL_PROTOCOLS, "SSL");
-    localProps.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
+    localProps.setProperty(CLUSTER_SSL_PROTOCOLS, "SSL");
+    localProps.setProperty(CLUSTER_SSL_REQUIRE_AUTHENTICATION, "true");
     System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.trustStore", jks.getCanonicalPath());
     System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.trustStorePassword",
"password");
 
@@ -129,10 +129,10 @@ public class HTTPServiceSSLSupportJUnitTest {
 
     Properties localProps = new Properties();
     localProps.setProperty(MCAST_PORT, "0");
-    localProps.setProperty(SSL_ENABLED, "true");
+    localProps.setProperty(CLUSTER_SSL_ENABLED, "true");
 
-    localProps.setProperty(SSL_PROTOCOLS, "SSL");
-    localProps.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
+    localProps.setProperty(CLUSTER_SSL_PROTOCOLS, "SSL");
+    localProps.setProperty(CLUSTER_SSL_REQUIRE_AUTHENTICATION, "true");
 
     Properties sslProps = new Properties();
     sslProps.setProperty("javax.net.ssl.keyStore", jks.getCanonicalPath());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f71350a1/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
index c591732..6b6e3de 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
@@ -114,10 +114,10 @@ public class SSLCredentialGenerator extends CredentialGenerator {
 
   private Properties getSSLProperties() {
     Properties props = new Properties();
-    props.setProperty(SSL_ENABLED, "true");
-    props.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
-    props.setProperty(SSL_CIPHERS, "SSL_RSA_WITH_3DES_EDE_CBC_SHA");
-    props.setProperty(SSL_PROTOCOLS, "TLSv1");
+    props.setProperty(CLUSTER_SSL_CIPHERS, "true");
+    props.setProperty(CLUSTER_SSL_REQUIRE_AUTHENTICATION, "true");
+    props.setProperty(CLUSTER_SSL_CIPHERS, "SSL_RSA_WITH_3DES_EDE_CBC_SHA");
+    props.setProperty(CLUSTER_SSL_PROTOCOLS, "TLSv1");
     return props;
   }
 }



Mime
View raw message