geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [2/4] incubator-geode git commit: unit test now verifies that subscription sockets use ssl
Date Fri, 16 Oct 2015 00:29:47 GMT
unit test now verifies that subscription sockets use ssl


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

Branch: refs/heads/feature/GEODE-397
Commit: 50d3b469ee695aac765ab74fa96fbb634e83ad36
Parents: 1e13aad
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Thu Oct 15 15:59:20 2015 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Thu Oct 15 15:59:20 2015 -0700

----------------------------------------------------------------------
 .../internal/CacheServerSSLConnectionDUnit.java     | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/50d3b469/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnit.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnit.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnit.java
index 0a13c75..d01866d 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnit.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnit.java
@@ -132,7 +132,7 @@ public class CacheServerSSLConnectionDUnit extends DistributedTestCase
{
   
   public void setUpClientVM(String host, int port,
       boolean cacheServerSslenabled, boolean cacheServerSslRequireAuth,
-      String keyStore, String trustStore) {
+      String keyStore, String trustStore, boolean subscription) {
 
     Properties gemFireProps = new Properties();
 
@@ -164,7 +164,7 @@ public class CacheServerSSLConnectionDUnit extends DistributedTestCase
{
     System.out.println("Starting client ds with following properties \n" + sw.getBuffer());
     
     ClientCacheFactory clientCacheFactory = new ClientCacheFactory(gemFireProps);
-    clientCacheFactory.addPoolServer(host, port);
+    clientCacheFactory.setPoolSubscriptionEnabled(subscription).addPoolServer(host, port);
     clientCache = clientCacheFactory.create();
     
     ClientRegionFactory<String,String> regionFactory = clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY);
@@ -198,7 +198,13 @@ public class CacheServerSSLConnectionDUnit extends DistributedTestCase
{
       boolean cacheServerSslenabled, boolean cacheServerSslRequireAuth, String keyStore,
String trustStore)
       throws Exception {
     instance.setUpClientVM(host, port, cacheServerSslenabled,
-        cacheServerSslRequireAuth, keyStore, trustStore);
+        cacheServerSslRequireAuth, keyStore, trustStore, true);
+  }
+  public static void setUpClientVMTaskNoSubscription(String host, int port,
+      boolean cacheServerSslenabled, boolean cacheServerSslRequireAuth, String keyStore,
String trustStore)
+      throws Exception {
+    instance.setUpClientVM(host, port, cacheServerSslenabled,
+        cacheServerSslRequireAuth, keyStore, trustStore, false);
   }
   
   public static void doClientRegionTestTask() {
@@ -284,7 +290,7 @@ public class CacheServerSSLConnectionDUnit extends DistributedTestCase
{
     ExpectedException expect2 = addExpectedException("IOException", serverVM);
     try{
       //getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);
   
-      clientVM.invoke(CacheServerSSLConnectionDUnit.class, "setUpClientVMTask", params);
+      clientVM.invoke(CacheServerSSLConnectionDUnit.class, "setUpClientVMTaskNoSubscription",
params);
       clientVM.invoke(CacheServerSSLConnectionDUnit.class, "doClientRegionTestTask");
       serverVM.invoke(CacheServerSSLConnectionDUnit.class, "doServerRegionTestTask");
       fail("Test should fail as non-ssl client is trying to connect to ssl configured server");
@@ -297,7 +303,7 @@ public class CacheServerSSLConnectionDUnit extends DistributedTestCase
{
         assertTrue(t instanceof com.gemstone.gemfire.security.AuthenticationRequiredException);
       } else {
         //getLogWriter().error("Unexpected exception ", e);
-        fail("Unexpected Exception...expected "
+        fail("Unexpected Exception: " + e + " expected: "
             + AuthenticationRequiredException.class);
       }
     } finally {


Mime
View raw message