geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [07/26] incubator-geode git commit: GEODE-420: Fixing Tests
Date Fri, 22 Jul 2016 00:19:54 GMT
GEODE-420: Fixing 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/1b11b675
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/1b11b675
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/1b11b675

Branch: refs/heads/feature/GEODE-420
Commit: 1b11b675d4e8eca544c27f8a8c7d243393003af2
Parents: 93b960f
Author: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Authored: Wed Jun 15 11:05:10 2016 +1000
Committer: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Committed: Thu Jul 21 16:12:21 2016 -0700

----------------------------------------------------------------------
 .../internal/DistributionConfig.java            |  2 +
 .../internal/DistributionConfigImpl.java        |  8 +++-
 .../gemfire/internal/AbstractConfig.java        |  1 +
 .../gemfire/internal/i18n/LocalizedStrings.java | 14 +++----
 .../InternalDistributedSystemJUnitTest.java     |  1 -
 .../HTTPServiceSSLSupportJUnitTest.java         | 41 ++++++++++----------
 6 files changed, 38 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1b11b675/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index a6bd249..0494b50 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -4126,6 +4126,8 @@ public interface DistributionConfig extends Config, LogConfig {
   @ConfigAttribute(type = String.class)
   String SSL_ENABLED_COMPONENTS_NAME = SSL_ENABLED_COMPONENTS;
 
+  String DEFAULT_SSL_ENABLED_COMPONENTS = "";
+
   //*************** Initializers to gather all the annotations in this class ************************
 
   Map<String, ConfigAttribute> attributes = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1b11b675/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 4709a75..bbf46e7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -490,7 +490,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig
implement
 
   private String httpServiceSSLAlias = clusterSSLAlias;
 
-  private String sslEnabledComponents;
+  private String sslEnabledComponents = DEFAULT_SSL_ENABLED_COMPONENTS;
 
   private Map<String, ConfigSource> sourceMap = Collections.synchronizedMap(new HashMap<String,
ConfigSource>());
 
@@ -3260,6 +3260,12 @@ public class DistributionConfigImpl extends AbstractDistributionConfig
implement
     result = prime * result + (useSharedConfiguration ? 1231 : 1237);
     result = prime * result + ((userCommandPackages == null) ? 0 : userCommandPackages.hashCode());
     result = prime * result + ((userDefinedProps == null) ? 0 : userDefinedProps.hashCode());
+    result = prime * result + ((clusterSSLAlias == null) ? 0 : clusterSSLAlias.hashCode());
+    result = prime * result + ((serverSSLAlias == null) ? 0 : serverSSLAlias.hashCode());
+    result = prime * result + ((jmxManagerSSLAlias == null) ? 0 : jmxManagerSSLAlias.hashCode());
+    result = prime * result + ((gatewaySSLAlias == null) ? 0 : gatewaySSLAlias.hashCode());
+    result = prime * result + ((httpServiceSSLAlias == null) ? 0 : httpServiceSSLAlias.hashCode());
+    result = prime * result + ((sslEnabledComponents == null) ? 0 : sslEnabledComponents.hashCode());
     return result;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1b11b675/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
index da4209b..fae1908 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
@@ -218,6 +218,7 @@ public abstract class AbstractConfig implements Config {
       if (isDeprecated(attNames[i])) {
         continue;
       }
+      System.out.println("attNames = " + attNames[i]);
       result.setProperty(attNames[i], getAttribute(attNames[i]));
     }
     return result;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1b11b675/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
index c1b123a..7c6e933 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
@@ -3760,15 +3760,15 @@ public class LocalizedStrings {
   public static final StringId LuceneService_CANNOT_CREATE_INDEX_0_ON_REGION_1_WITH_ANALYZER_2_ON_FIELD_3_BECAUSE_ANOTHER_MEMBER_DEFINES_THE_SAME_INDEX_WITH_NO_ANALYZER_ON_THAT_FIELD
= new StringId(6630, "Cannot create Lucene index {0} on region {1} with analyzer {2} on field
{3} because another member defines the same index with no analyzer on that field.");
   public static final StringId LuceneService_CANNOT_CREATE_INDEX_0_ON_REGION_1_WITH_ANALYZER_2_ON_FIELD_3_BECAUSE_ANOTHER_MEMBER_DEFINES_THE_SAME_INDEX_WITH_ANALYZER_4_ON_THAT_FIELD
= new StringId(6631, "Cannot create Lucene index {0} on region {1} with analyzer {2} on field
{3} because another member defines the same index with analyzer {4} on that field.");
 
-  public static final StringId AbstractDistributionConfig_CLUSTER_SSL_ALIAS_0 = new StringId(6632,"SSL
communication uses the this alias when determining the key to use from the keystore for SSL.
Defaults to \"{0}\".");
-  public static final StringId AbstractDistributionConfig_GATEWAY_SSL_ALIAS_0 = new StringId(6632,"SSL
gateway communication uses the this alias when determining the key to use from the keystore
for SSL. Defaults to \"{0}\".");
-  public static final StringId AbstractDistributionConfig_SERVER_SSL_ALIAS_0 = new StringId(6632,"SSL
inter-server communication (peer-to-peer) uses the this alias when determining the key to
use from the keystore for SSL. Defaults to \"{0}\".");
-  public static final StringId AbstractDistributionConfig_HTTP_SERVICE_SSL_ALIAS_0 = new
StringId(6632,"SSL http service communication uses the this alias when determining the key
to use from the keystore for SSL. Defaults to \"{0}\".");
-  public static final StringId AbstractDistributionConfig_JMX_MANAGER_SSL_ALIAS_0 = new StringId(6632,"SSL
jmx communication uses the this alias when determining the key to use from the keystore for
SSL. Defaults to \"{0}\".");
+  public static final StringId AbstractDistributionConfig_CLUSTER_SSL_ALIAS_0 = new StringId(6633,"SSL
communication uses the this alias when determining the key to use from the keystore for SSL.
Defaults to \"{0}\".");
+  public static final StringId AbstractDistributionConfig_GATEWAY_SSL_ALIAS_0 = new StringId(6634,"SSL
gateway communication uses the this alias when determining the key to use from the keystore
for SSL. Defaults to \"{0}\".");
+  public static final StringId AbstractDistributionConfig_SERVER_SSL_ALIAS_0 = new StringId(6635,"SSL
inter-server communication (peer-to-peer) uses the this alias when determining the key to
use from the keystore for SSL. Defaults to \"{0}\".");
+  public static final StringId AbstractDistributionConfig_HTTP_SERVICE_SSL_ALIAS_0 = new
StringId(6636,"SSL http service communication uses the this alias when determining the key
to use from the keystore for SSL. Defaults to \"{0}\".");
+  public static final StringId AbstractDistributionConfig_JMX_MANAGER_SSL_ALIAS_0 = new StringId(6637,"SSL
jmx communication uses the this alias when determining the key to use from the keystore for
SSL. Defaults to \"{0}\".");
 
-  public static final StringId AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_0_INVALID_TRY_1
= new StringId(6633,"\"{0}\" is not in the valid set of {1}");
+  public static final StringId AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_0_INVALID_TRY_1
= new StringId(6638,"\"{0}\" is not in the valid set of {1}");
 
-  public static final StringId AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_SET_INVALID_DEPRECATED_SSL_SET
= new StringId(6634,"When using ssl-enabled-components one cannot use any other SSL properties
other than cluster-ssl-* or the corresponding aliases");
+  public static final StringId AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_SET_INVALID_DEPRECATED_SSL_SET
= new StringId(6639,"When using ssl-enabled-components one cannot use any other SSL properties
other than cluster-ssl-* or the corresponding aliases");
 
   /** Testing strings, messageId 90000-99999 **/
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1b11b675/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
index 2e4566f..cde334a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
@@ -703,7 +703,6 @@ public class InternalDistributedSystemJUnitTest
     // and its use in toProperties.
     // The other thing that is done is the ssl-* props are copied to cluster-ssl-*.
     // The following two assertions demonstrate this.
-    assertEquals(null, props1.getProperty(CLUSTER_SSL_ENABLED));
     assertEquals("true", props1.getProperty(CLUSTER_SSL_ENABLED));
     Config config2 = new DistributionConfigImpl(props1, false);
     assertEquals(true, config1.sameAs(config2));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1b11b675/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 b14a3d7..1e7ff69 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
@@ -16,21 +16,22 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import com.gemstone.gemfire.util.test.TestUtil;
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.Properties;
+
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import java.io.File;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
-import static org.junit.Assert.assertEquals;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
 
 /**
  * @since GemFire 8.1
@@ -112,15 +113,15 @@ public class HTTPServiceSSLSupportJUnitTest {
 
     DistributionConfigImpl config = new DistributionConfigImpl(localProps);
 
-    assertEquals(config.getHttpServiceSSLEnabled(), true);
-    assertEquals(config.getHttpServiceSSLProtocols(), "SSL");
-    assertEquals(config.getHttpServiceSSLRequireAuthentication(), true);
+    assertEquals(true, config.getHttpServiceSSLEnabled());
+    assertEquals("SSL", config.getHttpServiceSSLProtocols());
+    assertEquals(true, config.getHttpServiceSSLRequireAuthentication());
 
-    assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.keyStore"), jks.getCanonicalPath());
-    assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.keyStorePassword"),
"password");
+    assertEquals(jks.getCanonicalPath(), config.getHttpServiceSSLProperties().get("javax.net.ssl.keyStore"));
+    assertEquals("password", config.getHttpServiceSSLProperties().get("javax.net.ssl.keyStorePassword"));
     // assertIndexDetailsEquals(system.getConfig().getHttpServiceSSLKeyStoreType(),"JKS");
-    assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.trustStore"), jks.getCanonicalPath());
-    assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.trustStorePassword"),
"password");
+    assertEquals(jks.getCanonicalPath(), config.getHttpServiceSSLProperties().get("javax.net.ssl.trustStore"));
+    assertEquals("password", config.getHttpServiceSSLProperties().get("javax.net.ssl.trustStorePassword"));
 
   }
 
@@ -148,10 +149,10 @@ public class HTTPServiceSSLSupportJUnitTest {
     assertEquals(config.getHttpServiceSSLProtocols(), "SSL");
     assertEquals(config.getHttpServiceSSLRequireAuthentication(), true);
 
-    assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.keyStore"), jks.getCanonicalPath());
-    assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.keyStorePassword"),
"password");
-    assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.trustStore"), jks.getCanonicalPath());
-    assertEquals(config.getHttpServiceSSLProperties().get("javax.net.ssl.trustStorePassword"),
"password");
+    assertEquals(jks.getCanonicalPath(), config.getHttpServiceSSLProperties().get("javax.net.ssl.keyStore"));
+    assertEquals("password", config.getHttpServiceSSLProperties().get("javax.net.ssl.keyStorePassword"));
+    assertEquals(jks.getCanonicalPath(), config.getHttpServiceSSLProperties().get("javax.net.ssl.trustStore"));
+    assertEquals("password", config.getHttpServiceSSLProperties().get("javax.net.ssl.trustStorePassword"));
 
   }
 


Mime
View raw message